I am now using the DLM to esimate a Kalman filtering process with observations to be 1-dimension and state variables 3by1 dimension. Below is my programme, I am using the EXACT option in DLM so that Koopman(1997)'s exact initialization could be used.
* input data file
calendar(q) 1996:1
all 49
open data BOP_Q_MUSD.xls
data(format=xls,org=columns) / fa_usd
* unit root test
@dfunit(lags=4) fa_usd
*initialize the variables and matrices
nonlin v1 v2 v3
frml M3 = v1/sqrt(1+v1*v1)
frml Q1 = exp(v2)
frml Q3 = exp(v3)
dec rect z
dec vect x0
dec frml[rect] M
dec frml[symm] Q
dec frml[symm] sx0
dec frml[vect] f
dec frml[symm] sh0
compute z=||1.0|0.0|1.0||
compute x0=||0.0|0.0|0.0||
frml M = ||1.0,1.0,0.0|0.0,1.0,0.0|0.0,0.0,M3||
frml Q = ||Q1,0.0,0.0|0.0,0.0,0.0|0.0,0.0,Q3||
frml sx0 = ||0.0,0.0,0.0|0.0,0.0,0.0|0.0,0.0,Q3/(1-M3*M3)||
frml sh0 = ||1e7,0.0,0.0|0.0,1e7,0.0|0.0,0.0,0.0||
frml f = ||fa_usd||
* Kalman filter and parameter estimation
compute v1=v2=v3=0.0
dlm(trace,method=bfgs,a=M,c=z,sv=1.0,sw=Q,x0=x0,sx0=sx0,exact,sh0=sh0,y=f,variance=concentrated,vhat=vt,svhat=gt) / xt pt
My problem is that, whenever I ran this programme, a message always came up saying
"# DLM5. Probable Model Error. Diffuse prior was not reduced to zero rank"
May I ask how to deal with this problem?
Actually I deduced by hand that the kalman filter system I am using here could produce zero rank diffuse prior P(infinity).
Thank you! I need your help!
