Output direct to Excel
Hi,
Is it possible to direct output from a model directly to an Excel spread sheet?
Thank You,
Anja
Is it possible to direct output from a model directly to an Excel spread sheet?
Thank You,
Anja
A Forum for RATS Software and Econometrics Discussions
http://www.estima.com/forum/
calendar 1922
allocate 1941:1
open data fooddata.dat
data(format=free,org=obs) / foodcons prretail dispinc foodprod prfarm
set trend = t
set avgprices = (prfarm+prfarm{1})/2.0
*
report(action=define)
report(atrow=1,atcol=1) "R**2"
report(atrow=2,atcol=1) "DW"
linreg foodcons
# constant prretail dispinc trend
report(regressors)
report(atrow=1,column=current) %rsquared
report(atrow=2,column=current) %durbin
linreg foodcons
# constant prretail dispinc{0 1}
report(regressors)
report(atrow=1,column=current) %rsquared
report(atrow=2,column=current) %durbin
report(action=format,picture="*.###")
*
open copy testoutput.xls
report(action=show,format=xls,unit=copy)avik wrote:Hi Tom,
I followed your example above and was able to create an Excel file with the output of several regressions.
My question is as follows:
Currently the output comes as
Reg1 Reg2 Reg3 Reg4 Reg5
R**2 0.87 0.02 0.03 0.02 0.06
Constant 0.17 -0.02 0.02 -0.03 0.02
t-stat 3.76 -0.16 0.12 -0.28 0.19
EV1 0.53 0.02 -0.06 -0.04 0.09
19.20 0.36 -1.31 -1.11 1.88
EV2 -0.13 -0.09 0.14 0.06 0.04
-6.32 -1.58 2.41 1.33 0.55
EV3 0.10 0.08 -0.06 0.11 -0.19
4.54 1.56 -0.99 2.48 -3.90
Is there a way to get the output in a "transposed" format (so that the explanatory variables are in columns and the regressions are in rows)?
I played with the REPORT procedure, but could not get it to transpose the output.
Thanks.
report(action=define)
linreg privwage
# constant prod{0 1} trend
report(atrow=1,atcol=2,fillby=rows) %eqnreglabels(0)
report(atrow=2,atcol=1,fillby=rows) "OLS" %beta
linreg(inst) privwage
# constant prod{0 1} trend
report(atrow=3,atcol=1,fillby=rows) "2SLS" %beta
@liml privwage
# constant prod{0 1} trend
report(atrow=4,atcol=1,fillby=rows) "LIML" %beta
report(action=format,atcol=2,width=8)
report(action=show)