negative values for sigmas

Discussion of State Space and Dynamic Stochastic General Equilibrium Models
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

negative values for sigmas

Unread post by fan »

Dear Tom,

I am getting statistically significant negative values for the sigmas. I am a little bit specious about the results. I checked my codes again and again and I do not see the reason why I got the negative estimates for the sigmas. I guess it may be due to the initial values I assigned but I am not sure at this moment. Is there any possibility you could kindly take a look my code and let me know what you think I may have done wrong. Many Thanks.

Code: Select all

linreg q1
# constant term{1} default{1} dyield{1}
frml(lastreg,vector=b1) lineareqq1
compute gamma1=sqrt(%seesq/2)
set du = %resids-%resids{1}
linreg du
# yr34 yr34{1}
*# demo demo{1}
compute sigma1=sqrt(%seesq)

linreg q2
# constant term{1} default{1} dyield{1}
frml(lastreg,vector=b2) lineareqq2
compute gamma2=sqrt(%seesq/2)
set du = %resids-%resids{1}
linreg du
# yr34 yr34{1}
*# demo demo{1}
compute sigma2=sqrt(%seesq)

linreg q3
# constant term{1} default{1} dyield{1}
frml(lastreg,vector=b3) lineareqq3
compute gamma3=sqrt(%seesq/2)
set du = %resids-%resids{1}
linreg du
# yr34 yr34{1}
*# demo demo{1}
compute sigma3=sqrt(%seesq)

linreg q4
# constant term{1} default{1} dyield{1}
frml(lastreg,vector=b4) lineareqq4
compute gamma4=sqrt(%seesq/2)
set du = %resids-%resids{1}
linreg du
# yr34 yr34{1}
*# demo demo{1}
compute sigma4=sqrt(%seesq)

linreg q5
# constant term{1} default{1} dyield{1}
frml(lastreg,vector=b5) lineareqq5
compute gamma5=sqrt(%seesq/2)
set du = %resids-%resids{1}
linreg du
# yr34 yr34{1}
*# demo demo{1}
compute sigma5=sqrt(%seesq)



nonlin b1 b2 b3 b4 b5  gamma1 gamma2 gamma3 gamma4 gamma5  phi t1 t2=-phi*t1 sigma1 sigma2  sigma3 sigma4 sigma5
dec frml[symm] sv
frml sv = %diag(||sigma1^2,sigma2^2,sigma3^2,sigma4^2,sigma5^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 = ||gamma1, gamma2, gamma3, gamma4, gamma5||
dlm(presample=ergodic,a=af,c=cf,z=zf,MU=||lineareqq1, lineareqq2,lineareqq3,lineareqq4,lineareqq5||,f=1.0,sv=sv,sw=1.0,y=||q1,q2,q3,q4,q5||, method=bfgs,type=filter) / xstate
SIGMA1 -0.023528883 0.000611007 -38.50834 0.00000000
SIGMA2 -0.011152350 0.000349143 -31.94205 0.00000000
SIGMA3 0.002076065 0.000836615 2.48151 0.01308282
SIGMA4 -0.010542057 0.000309984 -34.00840 0.00000000
SIGMA5 -0.020986482 0.000564400 -37.18371 0.00000000
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: negative values for sigmas

Unread post by TomDoan »

Don't you square all of them? The sign is irrelevant.

Please don't keep adding threads to the same basic set of questions.
Post Reply