Adding controls to the attached model

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

alefrank90
Posts: 1
Joined: Wed Nov 13, 2019 8:03 am

Adding controls to the attached model

Postby alefrank90 » Thu Nov 21, 2019 9:34 am

Dear all, I am new to this forum, I joined because I am having a problem in my code and I need some help. (Eviews version 11)

Let me just focus on the critical part of the code. I have the following model to simulate for a panel of countries, that is composed by my some shocks (plugged as exogenous variables) and some yearly dummy (with IDC being the ID for each country, and VAR_to_PLOT the endogenous variables):

coef(1000) C1

system {%sys}
!J= 0
!I=100
!K=0
FOR %IDC {%LIST}
{%sys}.append {%VAR_to_PLOT}{%IDC} =
C1(1+!I) _
+ C1(2+!J)*shock1_{%IDC} _
+ C1(3+!J)*shock2_{%IDC} _
+ C1(4+!J)*shock3_{%IDC} _
+ C1(5+!J)*shock4_{%IDC} _
+ … …
+ C1(28+!J)*shock27_{%IDC} _
+ C1(50+!J)*dummy_s1983+ C1(51+!J)*dummy_s1984+ C1(52+!J)*dummy_s1985+ C1(53+!J)*dummy_s1986+ C1(54+!J)*dummy_s1987+ C1(55+!J)*dummy_s1988+ C1(56+!J)*dummy_s1989+ C1(57+!J)*dummy_s1990+ C1(58+!J)*dummy_s1991+ C1(59+!J)*dummy_s1992+ C1(60+!J)*dummy_s1993+ C1(61+!J)*dummy_s1994+ C1(62+!J)*dummy_s1995+ … … + C1(80+!J)*dummy_s2014


Where the … represents just the continuation of the code through shocks/year dummies.

Now, I need to introduce some controls, and I was thinking to just write in the model, between the shocks and the yearly dummies, the following:

(shocks) + … … + C1(30+!J)*control1_{%IDC} + C1(31+!J)*control2_{%IDC} + C1(32+!J)*control3_{%IDC} + … … + (yearly dummies)

but I get the following error:

is not defined or is an illegal command in "+ C1(50+!J)*dummy_s1983+ C1(51+!J)*dummy_s1984+ C1(52+!J)*dummy_s1985+ C1(53+!J)*dummy_s1986+ C1(54+!J)*dummy_s1987+ C1(55+!J)*dummy_s1988+ C1(56+!J)*dummy_s1989+ C1(57+!J)*dummy_s1990+ C1(58+!J)*dummy_s1991+ C1(59+!J)*dummy_s1992+ C1(60+!J)*dummy_s1993+ C1(61+!J)*dummy_s1994+ C1(62+!J)*dummy_s1995+ … … + C1(80+!J)*dummy_s2014"

Can you understand what Eview tries to tell me, and how can I introduce other variables on the right hand side of the regression??
Please, let me know if you need additional information, again, I am new to Eviews and this forum so I might omit necessary information.

Thank you in advance,
Alessandro
Last edited by alefrank90 on Thu Apr 09, 2020 9:38 am, edited 1 time in total.

EViews Matt
EViews Developer
Posts: 563
Joined: Thu Apr 25, 2013 7:48 pm

Re: Adding controls to the attached model

Postby EViews Matt » Thu Nov 21, 2019 10:13 am

Hello,

This may just be a matter of missing line continuation characters (_). I notice two omissions in the code you provided, on the lines "{%sys}.append {%VAR_to_PLOT}{%IDC} =" and "+ C1(28+!J)*shock27_{%IDC}", and your subsequent edits might contain a similar typo.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 44 guests