Identification issue in State-Space model
Re: Identification issue in State-Space model
Estimate it with phi unconstrained. If you end up with phi inside (-1,1) then you don't have to do anything. If you end up with phi outside, then you can worry about what to do.
phi=0 still is compatible with the model, it just doesn't give a very interesting common cycle.
phi=0 still is compatible with the model, it just doesn't give a very interesting common cycle.
Re: Identification issue in State-Space model
Dear Tom,TomDoan wrote:d1 can safely be zero. You're probably already running linear regressions of the dependent variables on 1 and x{1} to get guess values for the regression parameters. Pick a moderate value for phi like .7. With the variance of the shock to the state pegged to 1, the variance of y would be roughly 2. Reasonable guesses for the gammas would then be sqrt(regression variances/2).
I just would like to check with you that whether I am doing right for giving the initial values for gamma1 and gamma2.
Code: Select all
linreg r1
# constant X{1}
frml(lastreg,vector=b1) lineareqr1
compute gamma1=sqrt(%seesq/2)
linreg r2
# constant X{1}
frml(lastreg,vector=b1) lineareqr1
compute gamma2=sqrt(%seesq/2)
Re: Identification issue in State-Space model
That's what my suggestion was. But these are guess values. You probably don't have to worry if the estimation converges to reasonable-looking results.
Re: Identification issue in State-Space model
Dear Tom,TomDoan wrote:That's what my suggestion was. But these are guess values. You probably don't have to worry if the estimation converges to reasonable-looking results.
Your suggestion really helps. May I ask one more question? If the A matrix in my model is the product of two vectors (vector beta and vector alpha), and both vectors contain the parameters needed to be estimated. I would like to know if there is a way I can use the initial values from the vector b from linreg directly? Here is my code
Code: Select all
linreg d9
# constant term{1} default{1} dyield{1}
frml(lastreg,vector=b9) lineareqd9
compute gamma9=sqrt(%seesq/2)
set du = %resids-%resids{1}
linreg du
*# yr34 yr34{1}
# demo demo{1}
compute sigv9=sqrt(%seesq)
linreg d10
# constant term{1} default{1} dyield{1}
frml(lastreg,vector=b10) lineareqd10
compute gamma10=sqrt(%seesq/2)
set du = %resids-%resids{1}
linreg du
*# yr34 yr34{1}
# demo demo{1}
compute sigv10=sqrt(%seesq)
nonlin a2 a3 b1 b2 b3 b4 gamma9 gamma10 phi t1 t2=-phi*t1 sigv9 sigv10
dec symm sv(2,2)
compute sv=%diag(||sigv9^2,sigv10^2||)
dec frml[symm] zf af
*frml zf = ||t1*yr34+t2*yr34{1}||
frml zf = ||t1*demo+t2*demo{1}||
frml af = ||phi||
compute phi=0.7
dec frml[rect] cf
frml cf = || gamma9, gamma10||
dec frml[symm] muf
frml muf = ||a2*b1+a2*b2*term{1}+a2*b3*default{1}+a2*b4*dyield{1},a3*b1+a3*b2*term{1}+a3*b3*default{1}+a3*b4*dyield{1}||
*compute a2*b1=-0.036, a2*b2=0.007, a2*b3=0.007, a2*b4=0.562
*compute a3*b1=0.0134, a3*b2=-0.0037, a3*b3=-0.0038, a3*b4=0.0196
dlm(presample=ergodic,a=af,c=cf,z=zf,MU=muf,f=1.0,sv=sv,sw=1.0,y=|| d9, d10||, method=bfgs,type=filter) / xstate
Re: Identification issue in State-Space model
Aren't your A's and B's unidentified? Scale up the B's and you can scale down both A's to match. You'll have to get rid of one of the A's. And, if so, you can just take the LINREG coefficients and copy them into the B's. (B1=%beta(1),...)
Re: Identification issue in State-Space model
Hi Tom,TomDoan wrote:Aren't your A's and B's unidentified? Scale up the B's and you can scale down both A's to match. You'll have to get rid of one of the A's. And, if so, you can just take the LINREG coefficients and copy them into the B's. (B1=%beta(1),...)
Thanks for the quick reply. I am not 100% sure I understood your suggestion completely. Here are the codes. Could you please take a look and let me know if they make sense to you?
Code: Select all
linreg d9
# constant term{1} default{1} dyield{1}
compute b1=%beta(1), b2=%beta(2), b3=%beta(3), b4=%beta(4)
compute gamma9=sqrt(%seesq/2)
set du = %resids-%resids{1}
linreg du
# demo demo{1}
compute sigv9=sqrt(%seesq)
linreg d10
# constant term{1} default{1} dyield{1}
compute gamma10=sqrt(%seesq/2)
set du = %resids-%resids{1}
linreg du
# demo demo{1}
compute sigv10=sqrt(%seesq)
nonlin a2=1 a3 b1 b2 b3 b4 gamma9 gamma10 phi t1 t2=-phi*t1 sigv9 sigv10
dec symm sv(2,2)
compute sv=%diag(||sigv9^2,sigv10^2||)
dec frml[symm] zf af
*frml zf = ||t1*yr34+t2*yr34{1}||
frml zf = ||t1*demo+t2*demo{1}||
frml af = ||phi||
compute phi=0.7
dec frml[rect] cf
frml cf = || gamma9, gamma10||
dec frml[symm] muf
frml muf = ||a2*b1+a2*b2*term{1}+a2*b3*default{1}+a2*b4*dyield{1},a3*b1+a3*b2*term{1}+a3*b3*default{1}+a3*b4*dyield{1}||
dlm(presample=ergodic,a=af,c=cf,z=zf,MU=muf,f=1.0,sv=sv,sw=1.0,y=|| d9, d10||, method=bfgs,type=filter) / xstate
Re: Identification issue in State-Space model
That's fine.