Saving a Loop Regression

For questions regarding programming in the EViews programming language.

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

fcscunha
Posts: 13
Joined: Mon Oct 19, 2009 6:19 am

Saving a Loop Regression

Postby fcscunha » Tue Nov 10, 2009 12:38 pm

Hi,
i want to estimate several regression saving them as the follow:

for !k = 1 to 74
for !i = 1 to 11
for !j = 0 to 11
series mat_temp = wt(!k)
series www = @str(!i) + @str(!j) + @str(wt(k!))
equation eqwww.ls h c h(-i!) mat_temp(-!i)
next
next
next

where
wt ia group that contains 74 variables
mat_temp is a temporary serie that contain the serie the k variables (i used it because in the regression that was not inverting)
h is the dependent variable

Howhever there are two errors. Firstly, in the string (in the fifth line), then in the line of the equation. I want to save this all regressions and want to extract the aic, bic and r2.

I'd like to see what variable is being used in the regression. If there is a way to remove the mat_temp, i will be very grateful.

Can you help me?

criteg
Posts: 1
Joined: Tue Nov 17, 2009 8:52 am

Re: Saving a Loop Regression

Postby criteg » Tue Nov 17, 2009 9:10 am

try this with the command @seriesname

for !k = 1 to 74
for !i = 1 to 11
for !j = 0 to 11
%X= = wt.@seriename(!k)
%www = @str(!i) + @str(!j) + %x
equation eq{%www}.ls h c h(-i!) %x(-!i)
next
next
next

I hope that goes on, you could have some error if the names of the series of wt are to long.
Cristian


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 37 guests