Page 1 of 2
Sinclair(2009) JMCB

Posted:
Mon Nov 02, 2009 6:41 pm
by TomDoan
Replication of Sinclair(2009), "The Relationships between Permanent and Transitory Movements in U.S. Output and the Unemployment Rate,"
Journal of Money, Credit and Banking, vol. 41(2-3), pages 529-542. This extends the unobserved components model with correlated shocks and trend break of Perron and Wada(2009) (
http://www.estima.com/forum/viewtopic.php?f=8&t=1504) to a bivariate system with GDP and unemployment.
This also estimates univariate models in hopes of producing guess values for the joint model. The estimation of the model is rather touchy, as there are several local modes. This reproduces the results in the paper...by feeding in the results in the paper. Note that the author's Gauss code does the same thing, so locating the global optimum must be quite difficult. The univariate models end up not helping much, since the two models end up with shocks that are almost perfectly (negatively) correlated, so there's quite a bit of cross variable information.
Re: Sinclair’s paper, JMCB, 2009

Posted:
Tue Nov 03, 2009 5:54 pm
by unforgiven02
Thank you very much Tom Doan for your help and Todd Clark for your comment. It's a great contribution..but when i run the program, Rats has closed itself, i tried many times but result is the same so i wasn't able to replicate the model using rats program. The version i'am using is 7.0, is this happen due to the version incompatibility?
Best.
Re: Sinclair’s paper, JMCB, 2009

Posted:
Fri Nov 06, 2009 7:29 am
by condor
I encountered the same problem. As far as I understand, the problem seems to occur from the following specification:
- Code: Select all
* This estimates the model with the pre-sample conditions used in the paper
*
dlm(start=DLMYUModelSetup(),a=ayu,z=zyu,sw=swyu,c=cyu,f=fyu,y=||lgdp,ur||,$
x0=x0,sx0=sx0,condition=4,parmset=jparms,pmethod=simplex,piters=5,method=bfgs,type=smooth)
It may seem a little bit ironic, but the code works perfectly if you skip these lines and estimate the model "with the more technically correct handling".
Re: Sinclair’s paper, JMCB, 2009

Posted:
Sat Nov 07, 2009 3:57 am
by unforgiven02
Even if i skip the lines shown by condor, the problem occurs again, the code doesn't work and rats shut down itself. I'm running rats line by line and rats shut down between the lines 55-60 before the lines condor indicated.
Re: Sinclair’s paper, JMCB, 2009

Posted:
Mon Nov 09, 2009 11:26 am
by moderator
You'll need version 7.2 (or later) to run that code. Version 7.2 includes a fix for the bug that causes that DLM instruction to fail.
Regards,
Tom Maycock
Re: Sinclair(2009) JMCB

Posted:
Tue Mar 12, 2013 12:45 pm
by mskare69
Dear Tom,
I run the code for the Sinclair (2009) but the results are not fully the same and also output in rats is missing the cross correlation part of the table from Sinclair paper? Any suggestions how to exactly replicate the results and get the cross correlation results as in the paper?
Fondly,
Marinko
Re: Sinclair(2009) JMCB

Posted:
Tue Mar 12, 2013 1:11 pm
by TomDoan
mskare69 wrote:Dear Tom,
I run the code for the Sinclair (2009) but the results are not fully the same and also output in rats is missing the cross correlation part of the table from Sinclair paper? Any suggestions how to exactly replicate the results and get the cross correlation results as in the paper?
Fondly,
Marinko
Each model (with and without the break) is estimated both with the handling of the unit roots done in the paper and with the more correct handling of them. The first in each set appears to reproduce the published results exactly, though we wouldn't recommend using that technique. The second set don't reproduce the results, and aren't intended to.
After any of the four DLM estimations
disp %cvtocorr(swyu)
will compute the correlations among the innovations.
Re: Sinclair(2009) JMCB

Posted:
Wed Mar 13, 2013 11:35 am
by mskare69
Dear Tom,
thanks for a fast reply, I get it now. Another question, how do I get the numbers to fill in (input cvinput) and part of the code below (I am new to state space, red your state space course materials but still miss few points).
dec symm cvinput(4,4)
input cvinput
1.0
-.8566 1.0
-.9330 +.8501 1.0
+.9397 -.9562 -.9666 1.0
compute swfactor=%decomp(%corrtocv(cvinput,||1.4534,.9620,.6889,.6462||.^2))
compute mu_y=.8421,ph1_y=.7431,ph2_y=-.2656
compute mu_u=.0000,ph1_u=.7012,ph2_u=-.1791
Fondly,
Marinko
Re: Sinclair(2009) JMCB

Posted:
Wed Mar 13, 2013 12:18 pm
by TomDoan
There are comments in the code about the guess values. They came out of Sinclair's Gauss program, and represent nearly converged values for the parameters. The model is extremely hard to fit and quite honestly, I never came up with a reasonable process for starting with simple guess values. What are shown are probably the result of considerable trial-and-error which isn't shown in the program.
Re: Sinclair(2009) JMCB

Posted:
Thu Mar 14, 2013 2:14 am
by mskare69
Dear Tom,
I found this parameter initial values in the Sinclair original Gauss code
PRMTR_IN={ 4.000173 3.646685 1.267028 0.4 0.450644 0.208434 1.4 -0.179 -0.67 -0.919887 0.842129 0.591248 -0.2 0.5 -0.4};@-277.040573 @
@ use above starting values to eliminate imaginary standard errors and to match estimates in paper@
Values are quite different from the one in the rats code so I am not sure what are the input lines for the parameter values in the rats code and why the values differ from the Gauss one?
Fondly,
Marinko
Re: Sinclair(2009) JMCB

Posted:
Thu Mar 14, 2013 7:06 am
by TomDoan
She uses a very different parameterization for the covariance matrix---the RATS code uses a Choleski factor which avoids problems with the matrix going non-positive-definite. If you're trying to learn how to get guess values for the model, the person to contact would be Prof. Sinclair.
Re: Sinclair(2009) JMCB

Posted:
Thu Mar 14, 2013 3:46 pm
by mskare69
Dear Tom,
Thanks for help, can you suggest me how to perform state space modeling on nonstationary data? Something as Aoki algorithm or else?
Fondly,
Marinko
Re: Sinclair(2009) JMCB

Posted:
Fri Mar 15, 2013 6:53 am
by condor
There are very nice papers here on this subject:
http://www.estima.com/resources_articles.shtml
Re: Sinclair(2009) JMCB

Posted:
Fri Mar 15, 2013 6:59 am
by TomDoan
mskare69 wrote:Dear Tom,
Thanks for help, can you suggest me how to perform state space modeling on nonstationary data? Something as Aoki algorithm or else?
Fondly,
Marinko
Almost every example we have of state-space modeling is on non-stationary data. The unobservable components models in the state-space modeling textbooks (Durbin-Koopman, Commandeur-Koopman, Harvey and West-Harrison) are non-stationary.
Re: Sinclair(2009) JMCB - three variable model

Posted:
Tue Mar 19, 2013 12:35 pm
by mskare69
Dear Tom,
What would be the right way to include a third variable in the original Sinclair code? Can you help me with the code you already wrote for rats so as to include prices in the model? I would try to include a third variable estimating the relationship between permanent and transitory movements in output, unemployment rate and prices and the relationship between them (but I need your help on the code).
Thanks,
Marinko