Several Regressions
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Several Regressions
Hi!
I'm new to eviews programming. I'm using Eviews 6.0
I would be very grateful if you could help me.I have been reading the manual "Command and Programming reference" but I´m mixed up over this. I'm working with ten series (returns of ten currencies). Each of them has near 3000 data.
I would need to make linear regression of each currency against each pair of the other nine currencies. Just to obtain the R2.
How can i program that?
Thanks a lot for your time and help.
Regards.
I'm new to eviews programming. I'm using Eviews 6.0
I would be very grateful if you could help me.I have been reading the manual "Command and Programming reference" but I´m mixed up over this. I'm working with ten series (returns of ten currencies). Each of them has near 3000 data.
I would need to make linear regression of each currency against each pair of the other nine currencies. Just to obtain the R2.
How can i program that?
Thanks a lot for your time and help.
Regards.
Re: Several Regressions
Hi Puko,
if you name your 10 currency series as curr1, curr2, ..., curr10, is this what you mean? Hlp doc search: FOR LOOP, EQUATION, PROGRAM VARIABLES
if you name your 10 currency series as curr1, curr2, ..., curr10, is this what you mean?
Code: Select all
for !i = 1 to 10
for !j = 1 to 10
equation eq_{!i}_{!j}.ls curr{!i} c curr{!j}
next
next Re: Several Regressions
Thanks!! I think so!! I will try later this evening!!
Thanks again!!
Thanks again!!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Several Regressions
Might want to change the code slightly:
You might find it useful to read through the Programming Guide too.
Code: Select all
for !i = 1 to 10
for !j = 1 to 10
if !i<>! then
equation eq_{!i}_{!j}.ls curr{!i} c curr{!j}
endif
next
next
Re: Several Regressions
Thanks, but what i really want to make is several regressions with two regressors in each.
With this program
for !i = 1 to 10
for !j = 1 to 10
equation eq_{!i}_{!j}.ls curr{!i} c curr{!j}
next
next
I obtain the regressions but with only one regressor.
I would like equations like this: .ls curr{!i} c curr{!j} curr{!z}
I have tried the following but there must be some mistakes. ¿Could you help me again please?
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
next
next
next
With this program
for !i = 1 to 10
for !j = 1 to 10
equation eq_{!i}_{!j}.ls curr{!i} c curr{!j}
next
next
I obtain the regressions but with only one regressor.
I would like equations like this: .ls curr{!i} c curr{!j} curr{!z}
I have tried the following but there must be some mistakes. ¿Could you help me again please?
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
next
next
next
Re: Several Regressions
Indeed. Sorry! I better reply no posts should I do it too quickly and with mistakes.Might want to change the code slightly:
Re: Several Regressions
I have also tried with this program, but there are mistakes.
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !z=!y then
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
Any idea please? Thanks.
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !z=!y then
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
Any idea please? Thanks.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Several Regressions
Code: Select all
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !i<>!j and !i<>!z then
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
Re: Several Regressions
Hi Gareth,
I had problems with you program, but at the end i have one that is working:
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !z=!j then
!k=1
else
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
But now, i would like to extract only the R2 coefficients of each one of the regression. I have tried reading your Programming Guide and the example of R2 but i am not able.
Could you please help me?
Thanks again!!
I had problems with you program, but at the end i have one that is working:
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !z=!j then
!k=1
else
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
But now, i would like to extract only the R2 coefficients of each one of the regression. I have tried reading your Programming Guide and the example of R2 but i am not able.
Could you please help me?
Thanks again!!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Several Regressions
What have you tried and how did it not work?
Re: Several Regressions
With that, i get the problem "near singular matrix"
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !i<>!j and !i<>!z then
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !i<>!j and !i<>!z then
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Several Regressions
Code: Select all
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !i<>!j and !i<>!z and !j<>!z then
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
Re: Several Regressions
Thanks!! That one works perfectly!
Could you please help me getting only the R2 of these regressions?? That´s the last thing i would need.
Thanks again!!
Could you please help me getting only the R2 of these regressions?? That´s the last thing i would need.
Thanks again!!
Re: Several Regressions
Any help please to get only the R2 of the regressions from here.
Thanks!!
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !i<>!j and !i<>!z and !j<>!z then
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
Thanks!!
for !i = 1 to 10
for !j = 1 to 10
for !z = 1 to 10
if !i<>!j and !i<>!z and !j<>!z then
equation eq_{!i}_{!j}_{!z}.ls curr{!i} c curr{!j} curr{!z}
endif
next
next
next
Who is online
Users browsing this forum: No registered users and 2 guests
