Dynamic factor model SS
Posted: Wed Mar 20, 2013 11:14 am
Hi,
I am writing a code for a simple dynamic factor model. I am trying to extract mom gdp growth based on a factor called f1. For the moment, we can treat f1 as exogeneous. The equations I am trying to achieve is,
y(q) = 1/3 * y(t) + 2/3 * y(t-1) + y(t-2) + 2/3 * y(t-3) + 1/3 * y(t-4)
y(t) = c(1) * f1 + e1
-y(q) is in quarterly basis.
The code I wrote is.
@signal gdp2 =1/3* sv1 + 2/3 * sv2 + sv3 + 2/3 * sv4 +1/3 *sv4(-1)
@signal l_factor = c(1) * sv1 + [var = exp(c(1))]
@state sv2 = sv1(-1)
@state sv3 = sv2(-1)
@state sv4 = sv3(-1)
for some reason i kept getting an error msg, " syntax error in equation in equation @signal gdp2 =c(1) * sv1 + c(2) * sv2 + c(3) * sv3 + * sv4 +1/3 *sv4(-1)
Can someone kindly point out how i can rectify this error?
thanks!
I am writing a code for a simple dynamic factor model. I am trying to extract mom gdp growth based on a factor called f1. For the moment, we can treat f1 as exogeneous. The equations I am trying to achieve is,
y(q) = 1/3 * y(t) + 2/3 * y(t-1) + y(t-2) + 2/3 * y(t-3) + 1/3 * y(t-4)
y(t) = c(1) * f1 + e1
-y(q) is in quarterly basis.
The code I wrote is.
@signal gdp2 =1/3* sv1 + 2/3 * sv2 + sv3 + 2/3 * sv4 +1/3 *sv4(-1)
@signal l_factor = c(1) * sv1 + [var = exp(c(1))]
@state sv2 = sv1(-1)
@state sv3 = sv2(-1)
@state sv4 = sv3(-1)
for some reason i kept getting an error msg, " syntax error in equation in equation @signal gdp2 =c(1) * sv1 + c(2) * sv2 + c(3) * sv3 + * sv4 +1/3 *sv4(-1)
Can someone kindly point out how i can rectify this error?
thanks!