State space model and extracting the dynamic factor

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

blanquita1984
Posts: 3
Joined: Fri Jun 21, 2013 3:14 am

State space model and extracting the dynamic factor

Postby blanquita1984 » Wed Jul 10, 2013 1:57 am

Hi,
I am looking to build a state space model based on the following variables from my workfile:
bcon_accom bcon_fin bcon_restate bcon_trade bcon_transp bconf_constr bconf_man conf_cons1 conf_cons2 dwell_compl empl_priv indorder ip_cap ip_durable ip_elec ip_ener ip_int ip_man ip_min ip_nondurable ip_tot ip_water nomwage_priv price_cons realwage_priv regunemp regunempr retsale retsale2

So far I only have a model that used up 3 variables, but I keep getting errors when I build in the rest of the variables.
Please can you add more to my existing state space model and tell me how to use the rest of the variables?
Also, once the state space model is built, what is the process to extract the Dynamic Factor?
It is very urgent, please help me in this as soon as possible.
Thank you,


sspace dfm
dfm.append @signal bcon_accom = sv1 + e1
dfm.append @signal bcon_fin = c(1) + c(2)*sv1 + e2
dfm.append @signal bcon_restate= c(3) + c(4)*sv1 + e3
dfm.append @state sv1= c(5) + c(6)*sv1(-1) + c(7)*sv2(-1) + [ename=eps, var=1]
dfm.append @state sv2 = sv1(-1)
dfm.append @state e1= c(8)*e1(-1) + [ename = e12, var=exp(c(11))]
dfm.append @state e2= c(9)*e2(-1) + [ename = e22, var=exp(c(12))]
dfm.append @state e3= c(10)*e3(-1) + [ename = e32, var=exp(c(13))]
dfm.append @evar cov(e12,e22) = c(14)
dfm.append @evar cov(e12,e32) = c(15)
dfm.append @evar cov(e22,e32) = c(16)
dfm.append param c(1) .0 c(2) .0 c(3) .0 c(4) .0 c(5) .0 c(6) .0 c(7) .0 c(8) .0 c(9) .0 c(10) .0 c(11) .0 c(12) .0 c(13) .0 c(14) .0 c(15) .0 c(16) .0
smpl 2003q1 2013q1
dfm.ml
dfm.makestates *_ss
smpl @all
Attachments
workfile_polandok_work_2013_03_26.wf1
(762.56 KiB) Downloaded 231 times

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: State space model and extracting the dynamic factor

Postby trubador » Wed Jul 24, 2013 12:50 am

There is no way to help without knowing what you are trying to do. All I can say is that you have only 41 observations in the sample and even with a three-variable model you have to estimate 16 coefficents. At his point, I do not think you'll get quick and feasible results. Assuming the model is not ill-defined, you may need to work on starting values of coefficents as well as the initialization of states' mean and variances.

The following line in your code:

Code: Select all

dfm.makestates *_ss
already saves sv1_ss variable to your workfile, which corresponds to the dynamic factor you look for. Using c(1)-c(2) and c(3)-c(4) you can generate the factor values for bcon_fin and bcon_restate variables.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests