Hi
I am working on dynamic factor models, using sspace and a large panel of time series as observation variables, and I am looking for a method to define the signal and state equations within loops.
The problem is as follows:
in matrix notation the observation equation is:
X(t) = A*F(t) + e(t), where the dimensions are: X(t) - nx1, A - nxr, F(t) - rx1, e(t) - nx1
and the state equation is:
F(t) = B*F(t-1) + u(t), where the dimensions are: B - rxr (or r*lags x r*lags if I have more lags), u(t) - qx1
thus, I have to specify n signal equations with r+1 (r columns of F plus constant term) terms plus the error term
and r state equations with r terms plus the error term
Specifying the n and r equations accordingly doesn't seem to be a problem as I use the following for example:
for !i = 1 to !n
' define observation equation
ss1.append @signal sig{!i} = c({count1}) + c({count2})*sv_1 + c({count3})*sv_2 + e{!i}
next
where count1 etc come from previous calculations where I keep track of the total number of parameters. The problem seems to be the specification of the RHS terms. Here I have only 2+1+1 terms, but how do I deal with r+1+1 terms? That is, can I create a loop where I give r as input and it gives:
ss1.append @signal sig{!i} = c({count1}) + c({count2})*sv_1 + c({count3})*sv_2 +...+ c({count(r-1)})*sv_r + e{!i}
I had posted a related enquiry under ‘increasing number of regressors’ where I wanted to add terms on the RHS of the regression equation and the trick was to regress the LHS on a group of series, RHS, where RHS was constructed using RHS.add nameofseries in a loop.
Hence, I am looking for a similar way to create the right hand side of the @signal and @state equations.
I would appreciate any help.
Cheers
large panel dynamic factor model
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Re: large panel dynamic factor model
Hi again
I just want to be more specific with the problem above, I want to know how to create the right hand of the following equation
ss1.append @signal sig{!i} = c({count1}) + c({count2})*sv_1 + c({count3})*sv_2 +...+ c({count(r+1)})*sv_r + e{!i}
hence I am looking for something that looks like this:
for !i = 1 to !n
for !j = 1 ro !r
ss1.append @signal sig{!i} = .............
next
next
If i cannot add terms directly on ss1.append @signal sig{!i} = ... , is it possible to somehow create the RHS as a string and then place next to '=' ? In this way I could potentially build any (meaningful) RHS terms.
Gareth can you help? I would appreciate your expertise.
Cheers
I just want to be more specific with the problem above, I want to know how to create the right hand of the following equation
ss1.append @signal sig{!i} = c({count1}) + c({count2})*sv_1 + c({count3})*sv_2 +...+ c({count(r+1)})*sv_r + e{!i}
hence I am looking for something that looks like this:
for !i = 1 to !n
for !j = 1 ro !r
ss1.append @signal sig{!i} = .............
next
next
If i cannot add terms directly on ss1.append @signal sig{!i} = ... , is it possible to somehow create the RHS as a string and then place next to '=' ? In this way I could potentially build any (meaningful) RHS terms.
Gareth can you help? I would appreciate your expertise.
Cheers
Who is online
Users browsing this forum: No registered users and 2 guests
