estimating CFX with the estimation equation

For questions regarding programming in the EViews programming language.

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

YK_Econ
Posts: 36
Joined: Wed Jan 28, 2015 8:34 am

estimating CFX with the estimation equation

Postby YK_Econ » Thu Nov 05, 2015 9:35 am

Hi,

When i estimate an equation with CFX and then click on representations it gives me the option of "estimation equation" it is the code, where each independent variable has the number of the coefficient in brackets. it looks like this: C(1)*LOG(CONS(-1)) and so forth.

unfortunately, it gives me a syntax error, when i copy and paste the code and want to do it again (via pressing run in a program). as this procedure works with equations where is no CFX it must be something with the CFX.

Code: Select all

DLOG(CONS) = C(1)*LOG(CONS(-1)) + C(2)*LOG(WS(-1)) + C(3)*LOG(Y(-1)) + C(4)*DLOG(Y) + C(5)*DLOG(WS) + C(6)*DLOG(Y(-1)) + C(7)*DLOG(Y(-2)) + C(8)*DLOG(Y(-3)) + C(9)*DLOG(Y(-4)) + C(10)*DLOG(Y(-5)) + C(11)*DLOG(Y(-6)) + C(12)*DLOG(Y(-7)) + C(13)*DLOG(Y(-8)) + C(14)*DLOG(WS(-1)) + C(15)*DLOG(WS(-2)) + C(16)*DLOG(WS(-3)) + C(17)*DLOG(WS(-4)) + C(18)*DLOG(WS(-5)) + C(19)*DLOG(WS(-6)) + C(20)*DLOG(WS(-7)) + C(21)*DLOG(WS(-8)) + C(22) + [CX=F]

i tried already putting a C(23)*[CX=F] but it didn't work either.

I am desperate
cheers
YK

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: estimating CFX with the estimation equation

Postby EViews Gareth » Thu Nov 05, 2015 9:38 am

What are you trying to do?

YK_Econ
Posts: 36
Joined: Wed Jan 28, 2015 8:34 am

Re: estimating CFX with the estimation equation

Postby YK_Econ » Thu Nov 05, 2015 9:49 am

i want to write this code this way, for two reasons: 1)t o be later able to add them up more easily, as it seems that it is easier to refer to specific coefs if you do it this way

this code:

Code: Select all

for !n=5 to 8 scalar lr_coef_c{!n} = 0 lr_coefc{!n} = lr_coefc{!n} + c{!n}@coef(c(1)/c(2)) next
2) i have 40 independent variables sometime, so it is easier to get the right coef when i want to refer to them.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: estimating CFX with the estimation equation

Postby EViews Gareth » Thu Nov 05, 2015 9:50 am

ok, so just don't include the CX=F bit at the end.

YK_Econ
Posts: 36
Joined: Wed Jan 28, 2015 8:34 am

Re: estimating CFX with the estimation equation

Postby YK_Econ » Thu Nov 05, 2015 10:02 am

but i want to include country fixed effects ;)

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: estimating CFX with the estimation equation

Postby EViews Gareth » Thu Nov 05, 2015 10:03 am



Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests