Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: add results of lincom postestimation command to a table using outreg2


From   "Roy Wada" <[email protected]>
To   <[email protected]>
Subject   st: RE: add results of lincom postestimation command to a table using outreg2
Date   Thu, 2 Apr 2009 16:32:58 -0700

Someone should be put in the help file.

sysuse auto, clear
reg price mpg rep head
lincom mpg + rep
local tstat=r(estimate)/r(se)
local pval = tprob(r(df), abs(`tstat'))
outreg2 using "myfile", adds(joint, r(estimate), t-stat, `tstat', p-val,
`pval') replace see

Roy



I am trying to add the results of the lincom postesimation command to a
table of regression output created by outreg2 using the "addstat" option.
I am having two problems, the first is that I am only able to add the
estimate, not the standard error or t-statistic, and that I cannot get the
syntax correct to have the table created as an excel file.

The following will add the estimate of x2+x3:

  reg y x1 x2 x3
  lincom x2 + x3
  local F1 = r(estimate)
  outreg2 using "myfile", addstat(Test1, `r(estimate)')

I'm having trouble with the proper syntax to add the standard error and/or
t-statistic, and have the table written as an excel file.

Joshua A. Shindell


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index