Hi guys,
For me programming Eviews is totally new, so I first worked through the guide available, but still haven't found what I was looking for.
In my case, I have got several dependent variables, but I know how to change those in a program.
However, I got several independent variables, of which some are fixed, and others are not. The first "fixed" variables are certainly needed for the regressions, but I want to know which other variables do give more explanation power. But I do not know how to implement this in my program.
So the regressions look like this:
y(1) = c + x(1) + x(2) +x(3) + x(4) + x(5) + x(6) + x(v1)
y(1) = c + x(1) + x(2) +x(3) + x(4) + x(5) + x(6) + x(v2)
y(1) = c + x(1) + x(2) +x(3) + x(4) + x(5) + x(6) + x(v3)
y(2) = c + x(1) + x(2) +x(3) + x(4) + x(5) + x(6) + x(v1)
y(2) = c + x(1) + x(2) +x(3) + x(4) + x(5) + x(6) + x(v2)
y(2) = c + x(1) + x(2) +x(3) + x(4) + x(5) + x(6) + x(v3)
y(3) = c + x(1) + x(2) +x(3) + x(4) + x(5) + x(6) + x(v1)
y(3) = c + x(1) + x(2) +x(3) + x(4) + x(5) + x(6) + x(v2)
y(3) = c + x(1) + x(2) +x(3) + x(4) + x(5) + x(6) + x(v3)
Is there a way to programm this, and if so, can somebody tell me how?
Thanks a lot in advance
Multiple regressions and changing independent variables
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
PeterDeJongh
- Posts: 4
- Joined: Wed Dec 14, 2011 4:00 am
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Multiple regressions and changing independent variables
What have you done so far?
-
PeterDeJongh
- Posts: 4
- Joined: Wed Dec 14, 2011 4:00 am
Re: Multiple regressions and changing independent variables
Not too much I guess. I used the program from the "introductions" part on this website, which creates different regressions for all variables using the loops etc.
I sort of rewrote it to make it accessable for my own dataset.
This is what I got so far:
for !i=1 to sectors.@count
%iname = sectors.@seriesname(!i)
for !j=1 to control.@count
%jname = control.@seriesname(!j)
for !k=1 to commodities.@count
%kname = commodities.@seriesname(!k)
eq.ls {%iname} c {%jname} {%kname}
r2s(!rowcounter) = eq.@r2
!rowcounter = !rowcounter+1
next
next
next
Point is though, that from the "control" group, all the variables should allways be in the regressions. Probably this is a pretty simple command, but I do not know how to implement this in the program control window.
Thanks in Advance!!
I sort of rewrote it to make it accessable for my own dataset.
This is what I got so far:
for !i=1 to sectors.@count
%iname = sectors.@seriesname(!i)
for !j=1 to control.@count
%jname = control.@seriesname(!j)
for !k=1 to commodities.@count
%kname = commodities.@seriesname(!k)
eq.ls {%iname} c {%jname} {%kname}
r2s(!rowcounter) = eq.@r2
!rowcounter = !rowcounter+1
next
next
next
Point is though, that from the "control" group, all the variables should allways be in the regressions. Probably this is a pretty simple command, but I do not know how to implement this in the program control window.
Thanks in Advance!!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Multiple regressions and changing independent variables
If the control group is always in the regression, you don't need to loop over it:
Code: Select all
%control = control.@members
for !i=1 to sectors.@count
%iname = sectors.@seriesname(!i)
for !k=1 to commodities.@count
%kname = commodities.@seriesname(!k)
eq.ls {%iname} c {%control} {%kname}
r2s(!rowcounter) = eq.@r2
!rowcounter = !rowcounter+1
next
next
Who is online
Users browsing this forum: No registered users and 2 guests
