Moneta & Ruffer(2009)

If you are seeking RATS code for implementing a particular technique or replicating results from a paper, post your request here. Be sure to include complete citations for any papers or books.
hardmann
Posts: 252
Joined: Sat Feb 26, 2011 9:49 pm

Moneta & Ruffer(2009)

Unread post by hardmann »

Dear Tom:
Moneta & Ruuffer. Business cycle synchronisation in East Asia. Journal of Asian Economics 20 (2009)1-12
I had asked to author for data or code. However, no response. In thier paper, they use a measurement equantion: Y(t)=AY(t-1)+BZ(t)+e(t). Y is a multivariant varivale for GDP. Can rats do it?

I have tried many times to ask data to authors who never response. I think whether Tom or Winrats will have a good touch with authors.


Regard.

Hardmann
Last edited by hardmann on Tue May 14, 2013 10:16 am, edited 1 time in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Moneta & Ruuffer(2009)

Unread post by TomDoan »

hardmann wrote:Dear Tom:
Moneta & Ruuffer. Business cycle synchronisation in East Asia. Journal of Asian Economics 20 (2009)1-12
I had asked to author for data or code. However, no response. In thier paper, they use a measurement equantion: Y(t)=AY(t-1)+BZ(t)+e(t). Y is a multivariant varivale for GDP. Can rats do it?

I have tried many times to ask data to authors who never response. I think whether Tom or Winrats will have a good touch with authors.


Regard.

Hardmann
That's actually quite a simple model---even simpler than the Stock and Watson common factor model since it's one lag rather than multiple lags. Yes, you can do that using DLM. The Y equation in the measurement equation, the Z equation is the state transition equation. AY(t-1) is observable given the parameters, so it can be handled using the MU option. B is the "C" in the RATS state space representation and D is the "A".
hardmann
Posts: 252
Joined: Sat Feb 26, 2011 9:49 pm

Re: Moneta & Ruffer(2009)

Unread post by hardmann »

Dear Tom:

I try to code the rpf for tow contries according to your advice to stimulate the Moneta & Ruffer(2009). I have tow quarter GDP series of cn and xj, and want to estimate the dynamic factor.
I have some question:
1: If we suppose autoregression strcture of y and x, how to specify them. In Stock and Watson(1991), "A Probability Model of the Coincident Economic Indicators", they specify the error sturture, otherwise In Moneta and Ruffer(2009), "Business cycyle synchronisation in east Asia", they specify yt=a*yt-1 + Xt +et. which is proper?
2: In Moneta and Ruffer(2009), the state equation Xt=a*Xt-1+nt,they do not specify stucture of Xt or nt, however, I get a straight line. Should I specify Xt to stochastic level or local linear trend,or specify nt for ar(2), or specify varible A ?

3. Stock and Watson(1991) specify ar(2) struture for y and indicators. Should they estimate them before?
4. my propram does work. I do not know how to modify it,Please Tom help me.

Thanks.
Hardmann

Code: Select all

* Moneta and Ruffer(2009), "Business cycyle synchronisation in east Asia"
* Based on thire model, I estimate that one between tow countires,CN & XJ.
* Data are quarterly real GDP and have been seasonally adjusted using X12
*
open data gdp_cn_xj.txt
calendar(q) 1997
data(format=free,org=columns) 1997:1 2012:4 gdp_cn gdp_xj
*
set i_cn   = 100.0*log(gdp_cn/gdp_cn{1})
set i_xj   = 100.0*log(gdp_xj/gdp_xj{1})

source regcrits.src
source stampdiags.src
source bjautofit.src


stats(noprint) i_cn
compute sigma_cn=%variance*.5
stats(noprint) i_xj
compute sigma_xj=%variance*.5

*
graph(footer="CN & XJ growth rate",key=upleft) 2
# i_cn
# i_xj

* Parameters for index
*
dec real sigma_f
compute sigma_f=0.0

* Construct fixed parts of the A matrix
dec real
compute f=1.0

dec rect c(1,2)
compute c=||1.0,1.0||

dec real a_cn a_xj
compute a_cn=0.0
compute a_xj=0.0

dec frml[vect] yf
frml yf = ||i_cn,i_xj ||

dec frml[vect] muf
frml muf = ||-a_cn*i_cn{1},-a_xj*i_xj{1} ||

nonlin a_cn a_xj  sigma_cn sigma_xj
*
dlm(y=yf,mu=muf,sv=%diag(||sigma_cn^2,sigma_xj^2||),c=c,a=1.0,f=1.0,$
   sw=sigma_f,presample=ergodic,type=filter,exact,$
   method=bfgs) 1997:2 * xstates
*
set indicator_f 1997:2 * = xstates(t)(1)
acc indicator_f
graph(footer="Coincident Indicator, Filtered Version")
# indicator_f
Attachments
gdp_cn_xj.txt
(1.55 KiB) Downloaded 1040 times
Last edited by hardmann on Tue May 14, 2013 4:53 am, edited 1 time in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Moneta & Ruffer(2009)

Unread post by TomDoan »

1. You didn't include sigma_f in your parameter set, so it stays at 0 which means that the state is constant.
2. You have two series with non-zero means. The model doesn't account for non-zero means except through X. So X picks those up. Accumulate what's roughly a constant and you get a straight line.
Post Reply