Rolling Multiple Regression

For questions regarding programming in the EViews programming language.

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

viam
Posts: 1
Joined: Fri Aug 18, 2017 3:23 pm

Rolling Multiple Regression

Postby viam » Mon Aug 21, 2017 2:30 pm

I have time series weekly data for (retail) price and quantity (sales) for 1084 stores from November 31, 2016 to August 20, 2017. I need to compute each store's individual elasticity, so I need to run 1084 regressions.

I need the final outcome to be a spread sheet with a list of the elasticity (B-coefficient of Price) for each agency with its corresponding R2, P-value, and durbin watson coefficient for each regression.

Is there any way I can obtain this list using Eviews other than running 1,084 regressions manually, and typing their coefficients, R2, P-value, and DW coefficients one by one?

Can I use a rolling multiple regression function? Can somebody help me with the syntaxis I can use to complete this task?

Are there any online Eviews programing resources that I can consult to get familiar with rolling multiple regression?

Thanks

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

Re: Rolling Multiple Regression

Postby EViews Gareth » Mon Aug 21, 2017 2:50 pm

Follow us on Twitter @IHSEViews

Fatih
Posts: 5
Joined: Mon Aug 14, 2017 2:09 pm

Re: Rolling Multiple Regression

Postby Fatih » Tue Aug 22, 2017 12:44 am

Run this code I found in the programming topics. I am too new to programming but it helped me a lot. I tried to explain as much as I could.

matrix(number of independent variables+1 for the constant if you have one,1048) coefs
equation eq
for !i=1 to 1048
for !j=1 to 1048
if !i=!j then
equation eq.ls y{!i} c a{!j} b{!j} c{!j} d{!j} e{!j} f{!j} (replace a,b,c,d,e,f with your independent variables, your independent variables should be named with number such as sales1, sales2, company1, company2 in your data set so that it can count, for your dependent variable, if it is constant just delete {!i}. If not name your dependent variable y1, y2,y3 for each company)
colplace(coefs, eq.@coefs, !i)
endif
next
next


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 17 guests