Page 2 of 2
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Fri May 28, 2010 11:11 am
by TomDoan
There must be some difference between the two of those other than multiplying up by 100. The only reason to rescale the data is to improve the behavior of the estimation process. If the estimation algorithms converge both ways, the two models should be effectively identical; you can't pick one over the other. The concentrated variance should be different by a factor of 10^4, but the ratios to the other variances should be unaffected. Since that's not happening, somehow you've done something else different between the two.
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Tue Jun 01, 2010 5:34 am
by Luckyboy
Hi Tom,
Thanks very much for all the assistance.. I am making progress with my work, thanks be to u..
meanwhile, i have 3 questions..
first, is it proper for theta, when concentrating out one of the variance to be negative?
secondly, i have 3 components in the state vector, B0, B1 and B2. but B0 is constant and its variance is zero. Hence, i have 2 variance components in W. i want to extract the variance of the 2 state disturbance, i used this instruction
dlm(y=imp,c=cv,sv=7.62976522e-009,sw=%diag(||0.00506,6.02757e-006||),f=||0.0,0.0|1.0,0.0|0.0,1.0||,exact,type=smooth,vhat=vhat,what=what) 1970:1 2009:3
i then,
set StructuralBreakinB1 = what(t)(1)
set StructuralBreakinB2 = what(t)(2)
i used spgraph to generate the plot of the two state disturbances but its only that for B2 that came up..isnt possible to obtain the estimate for the two state or 3 as the case may be?
third, does this diagnotic result indicates model inadequacy
State Space Model Diagnostics
Statistic Sig. Level
Q(25-1) 91.25 0.0000
Normality 19.67 0.0001
H(53) 1.20 0.5057
AIC=-3.744, SBC=-3.705, Q=91.25, Pvalue=0.0000
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Wed Jun 02, 2010 3:30 am
by TomDoan
Luckyboy wrote:Hi Tom,
Thanks very much for all the assistance.. I am making progress with my work, thanks be to u..
meanwhile, i have 3 questions..
first, is it proper for theta, when concentrating out one of the variance to be negative?
The component variances
should be positive. However, unrestricted ML estimates often can come in negative. The bottom of page six in:
http://www.estima.com/articles/TP2010-2 ... uction.pdf
describes how to use NONLIN to peg variances to zero that have strayed negative.
Luckyboy wrote:
secondly, i have 3 components in the state vector, B0, B1 and B2. but B0 is constant and its variance is zero. Hence, i have 2 variance components in W. i want to extract the variance of the 2 state disturbance, i used this instruction
dlm(y=imp,c=cv,sv=7.62976522e-009,sw=%diag(||0.00506,6.02757e-006||),f=||0.0,0.0|1.0,0.0|0.0,1.0||,exact,type=smooth,vhat=vhat,what=what) 1970:1 2009:3
i then,
set StructuralBreakinB1 = what(t)(1)
set StructuralBreakinB2 = what(t)(2)
i used spgraph to generate the plot of the two state disturbances but its only that for B2 that came up..isnt possible to obtain the estimate for the two state or 3 as the case may be?
Only the first 16 characters in a variable name matter, so StructuralBreakinB1 and StructuralBreakinB2 are the same series. B1StructuralBreak and B2StructuralBreak are OK because, even though they're longer than 16, they're different early in the name.
Luckyboy wrote:
third, does this diagnotic result indicates model inadequacy
State Space Model Diagnostics
Statistic Sig. Level
Q(25-1) 91.25 0.0000
Normality 19.67 0.0001
H(53) 1.20 0.5057
AIC=-3.744, SBC=-3.705, Q=91.25, Pvalue=0.0000
If your model is supposed to be describing the dynamics of the data, that Q doesn't look good.
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Thu Jun 10, 2010 7:31 am
by Luckyboy
Hi Tom,
Just wanna say thanks to you for all your assistance..
I have been able to make alot of progress as a result of your consistent assistance..
Thanks once again
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Tue Jun 22, 2010 8:13 am
by Luckyboy
Hello Tom,
I am sorry to bother you again.. please could you advise on what to do to get positive value for Eta in the estimation below. I have tried severally to no avail..
Nonlin d3 sigma eta psi zeta
compute sigma =initsig*0.00009,eta =initsig*0.000001
compute psi =initsig*0.001, zeta = initsig*0.001
compute d3 = c3
dec frml[rect] av
dec frml[symm] swv
frml av = ||1.0,0.0,0.0|0.0,1.0,0.0|0.0,0.0,1.0||
frml swv = ||eta,psi,zeta||
dec frml[rect] cv
frml cv = ||1.0,ltwm,lRp||
dlm(y=lexp-(d3*lexp{1}),a=av,c=cv,sv=sigma,sw=%diag(||eta,psi,zeta||),method=bfgs,exact,type=smooth) 1970:1 2009:3
DLM - Estimation by BFGS
Convergence in 51 Iterations. Final criterion was 0.0000048 <= 0.0000100
Quarterly Data From 1970:01 To 2009:03
Usable Observations 159
Rank of Observables 155
Log Likelihood 294.65157
Variable Coeff Std Error T-Stat Signif
********************************************************************************
1. D3 0.3831 0.1121 3.41825 0.00063025
2. SIGMA 1.5836e-004 1.7597e-004 0.89988 0.36818237
3. ETA -2.8014e-003 1.5321e-003 -1.82840 0.06748993
4. PSI 1.9001e-005 7.5924e-006 2.50268 0.01232582
5. ZETA 1.3645e-004 6.8409e-005 1.99468 0.04607747
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Tue Jun 22, 2010 10:42 am
by TomDoan
I can't tell you how to make it
positive since that doesn't give a well-defined optimization problem. Instead, you'll need to peg it to zero with:
There's nothing wrong with that; it's a frequent occurrence in state-space models that the optimum for a variance is at zero.
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Wed Jun 23, 2010 7:18 am
by Luckyboy
Thanks Tom.. when i pegged the Eta to zero, it implies that the parameter is now constant.. is it the same as removing the parameter from the state vector? i mean makinf that particular parameter part of the observable.
Thanks
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Wed Jun 23, 2010 8:23 am
by TomDoan
Luckyboy wrote:Thanks Tom.. when i pegged the Eta to zero, it implies that the parameter is now constant.. is it the same as removing the parameter from the state vector? i mean makinf that particular parameter part of the observable.
Thanks
That's all correct.
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Wed Jun 23, 2010 9:34 am
by Luckyboy
Hi Tom, thanks for your clarification..
pls, i got this result, the signs are ok but the P-value are all not signif.. can i go ahead and kalman filter with these estimates..
DLM - Estimation by BFGS
Convergence in 20 Iterations. Final criterion was 0.0000078 <= 0.0000100
Quarterly Data From 1970:01 To 2009:03
Usable Observations 159
Rank of Observables 156
Log Likelihood 293.32782
Variable Coeff Std Error T-Stat Signif
********************************************************************************
1. D0 4.4549701346 0.8556059500 5.20680 0.00000019
2. D3 0.3580651696 0.0718859718 4.98102 0.00000063
3. SIG 0.0001345637 0.0000466572 2.88409 0.00392542
4. ETA 0.0000200568 0.0000130219 1.54024 0.12350258
5. PSI 0.0000071267 0.0000237252 0.30039 0.76388253
Re: DLM ESTIMATION OF HYPER PARAMETRS
Posted: Fri Jun 25, 2010 1:12 pm
by TomDoan
You can. Of course, if your point was that you thought time varying coefficients were important, the data don't seem to agree, since you had to peg one variance at zero, and the other two aren't particularly large.