a question about state space model with exogenous regressors

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

Re: a question about state space model with exogenous regres

Unread post by fan »

TomDoan wrote:What you're doing in that last post isn't estimating the reduced form model from earlier, though this is probably OK for getting guess values.

Neither the multiple step calculation that you just did nor the non-linear least squares reduced form estimation can separate out the two variances. Instead, they only estimate the variance of the sum. So you need to (somehow) split up the variances to add up the %SEESQ. What you're doing isn't far off from that since you have one taking %SEESQ and the other a small fraction of that.
Thank you for the quick reply. Here are my modified codes. Would you please kindly take a look? I think there is something wrong as the estimate for sn is negative. I am looking forward to receiving help from you.

linreg evwrd
# constant term{1} default{1} dyield{1}
frml(lastreg,vector=b) lineareq evwrd
set du = %resids-%resids{1}
linreg du
# dummy dummy{1}
compute se=sqrt(%seesq)
compute sn=sqrt(0.001*%seesq)

dec frml[symm] sw1 sv1 zf cf
nonlin b a d1 d2=-a*d1 se sn
compute a=0.0147, d1=0.009
(0.0147 and 0.009 are the estimates from the non-linear least squares reduced form estimation)
frml zf = ||d1*year34+d2*year34{1}||
frml sw1 = ||sn^2||
frml sv1 = ||se^2||
dlm(presample=ergodic, a=0.00147, c=1.0,z=zf,MU=lineareq,f=1.0,sv=sv1,sw=sw1,y=evwrd,method=bfgs,vhat=vhat,svhat=svhat, type=filter)

DLM - Estimation by BFGS
Convergence in 19 Iterations. Final criterion was 0.0000082 <= 0.0000100
Monthly Data From 1954:04 To 2007:12
Usable Observations 645
Rank of Observables 644
Log Likelihood 1162.0438

Variable Coeff Std Error T-Stat Signif
*************************************************************************************
1. B(1) -0.008695096 0.005835652 -1.49000 0.13622536
2. B(2) 0.431357123 0.149346201 2.88830 0.00387326
3. B(3) -0.189038411 0.047518991 -3.97817 0.00006945
4. B(4) 0.656453817 0.162374291 4.04284 0.00005281
5. A 0.585856777 0.201356895 2.90954 0.00361956
6. D1 0.020106149 0.007528431 2.67070 0.00756942
7. SE 0.039821238 0.001042602 38.19408 0.00000000
8. SN -0.000001359 0.007678411 -1.77026e-004 0.99985875
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: a question about state space model with exogenous regres

Unread post by TomDoan »

See "Estimating Variances" on the bottom of page UG-325 of the RATS v8 User's Guide. You would also benefit from buying the State Space/DSGE e-course.

Your posts would be much easier to read if you use the "Code" button. Select the program files, and hit Code. Select the output lines and hit Code.
fan
Posts: 215
Joined: Wed Jun 19, 2013 5:14 pm

Parameter restriction in state-space model

Unread post by fan »

I have a transition equation which looks similar to the following one:
X_t=β1* X_(t-1)+β2 *Dummy_t+β3* Dummy_(t-1)+η_t, and β_3=-β_1×β_2.
I am wondering whther I can impose the restriction in such way?

Code: Select all

nonlin  beta1 beta2 beta3=-beta1*beta2
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: a question about state space model with exogenous regres

Unread post by TomDoan »

Yes. And if you want to include the derived beta3 in the output, you would do

nonlin beta1 beta2 beta3 beta3=-beta1*beta2
Post Reply