Eviews (.ls) vs Excel (LINEST)

For questions regarding programming in the EViews programming language.

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

robertobaggio
Posts: 2
Joined: Mon Jul 15, 2019 7:20 am

Eviews (.ls) vs Excel (LINEST)

Postby robertobaggio » Mon Jul 15, 2019 7:52 am

Hello,

I have been building a very simple rolling OLS regression model on EViews, using the equation.ls function. I previously had the same model (same data, same rolling window, etc.) in Excel using the LINEST() function. I compared the results and saw many - and sometimes significant - differences between the betas of the two regressions. Does anyone know what this may be due to? I imagined they should both return very similar results.
In EViews, my program looks like:

[...]
for !i=0 to 2000
smpl 1+!i 264+!i
equation EqName{!i}.ls dependentvar c variable1 variable2 variable3
smpl 264+!i 264+!i
series EQNAMEcoefcoef1= EQNAME{!i}.@coefs(1)
series EQNAMEcoefcoef2= EQNAME{!i}.@coefs(2)
series EQNAMEcoefcoef3= EQNAME{!i}.@coefs(3)
series EQNAMEcoefcoef4= EQNAME{!i}.@coefs(4)
next
[...]

Thanks!

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

Re: Eviews (.ls) vs Excel (LINEST)

Postby EViews Gareth » Mon Jul 15, 2019 7:55 am

They will give identical results if a) the same variables are included, b) the same data is used for those variables, and c) the same observations are used.

robertobaggio
Posts: 2
Joined: Mon Jul 15, 2019 7:20 am

Re: Eviews (.ls) vs Excel (LINEST)

Postby robertobaggio » Mon Jul 15, 2019 8:31 am

Hi,

thanks for your reply.

I have double-checked and all variables, dataset and observations are exactly the same. Could it be anything else?

Thank you

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

Re: Eviews (.ls) vs Excel (LINEST)

Postby EViews Gareth » Mon Jul 15, 2019 8:43 am

No.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests