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 (Bcoefficient of Price) for each agency with its corresponding R2, Pvalue, 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, Pvalue, 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
Rolling Multiple Regression
Moderators: EViews Gareth, EViews Jason, EViews Moderator

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 11546
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling Multiple Regression
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
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
Who is online
Users browsing this forum: No registered users and 5 guests