Page 1 of 1

Writing out residuals into excel file

Posted: Fri Aug 22, 2014 12:07 pm
by newbie001
Hi, I am wondering how to extract residuals from multiple regressions. Right now I want to test out a series of independent variables and then look at the residuals from each regression. Currently I have

for %1 "x1" "x2"...

regress y {%1}

smpl %start %end
series {%1} = resids

excel_output.add {%1}

next

write(t=xls) excel_ouput

I have been running into many syntax errors and excel only recording one residual series. Any help would be greatly appreciated. Thanks!

Re: Writing out residuals into excel file

Posted: Fri Aug 22, 2014 1:05 pm
by EViews Gareth

Code: Select all

group excel_output for %var "x1 x2 x3 x4" equation eq_{%var}.ls y {%var} eq_{%var}.makeresids resid_{%var} excel_output.add resid_{%var} next wfsave(t=excelxml) myfile.xlsx @keep excel_output

Re: Writing out residuals into excel file

Posted: Sat Oct 11, 2014 2:51 am
by Superbakkz
I would like something similar, only that i need to report the heteroskedastic robust standard errors. Instead of one dependent variable I also have multiple, each to be regressed on "their own" independent ones.

How would I adjust the code to make this work?

Thanks!

Re: Writing out residuals into excel file

Posted: Sat Oct 11, 2014 9:00 am
by EViews Gareth
Could you provide more details on exactly what you're trying to do?