Page 1 of 1

Rolling Multiple Regression

Posted: Mon Aug 21, 2017 2:30 pm
by viam
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

Re: Rolling Multiple Regression

Posted: Mon Aug 21, 2017 2:50 pm
by EViews Gareth

Re: Rolling Multiple Regression

Posted: Tue Aug 22, 2017 12:44 am
by Fatih
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