Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: Factor variables and outreg/outreg2 |

Date |
Sun, 4 Apr 2010 19:02:24 +0200 |

<> -fvvarlist-s are still a relatively new concept, so you may have to look at the names in -mat l e(b)- after the regression and handpick the names for the time being. -fvunab- does not seem to resolve this, either. *** sysuse auto, clear cap which estout if _rc ssc inst estout regress mpg i.foreign##c.weight i.rep78 headroom esttab using myfile, keep(1.foreign weight 1.foreign#c.weight headroom) replace !start myfile.txt *** HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Mirko Sent: Sonntag, 4. April 2010 17:17 To: statalist@hsphsun2.harvard.edu Subject: Re: st: Factor variables and outreg/outreg2 Dear all, My aim is to obtain a table only for some coefficients (the interaction terms or factor variables) using -outreg2-, but -outreg2- does not work with factor variables. I found a thread where the same problem was discussed on 28 January 2010, but there is no solution provided. Any suggestion/fix that could be implemented? Please find an example below. Thanks Mirko *-------------- begin example --------------------- sysuse auto, clear tempname myfile regress mpg i.foreign##c.weight i.rep78 headroom outreg2 i.foreign##c.weight headroom using `myfile', see *---------------- end example --------------------- . sysuse auto, clear (1978 Automobile Data) . . tempname myfile . . regress mpg i.foreign##c.weight i.rep78 headroom Source | SS df MS Number of obs = 69 -------------+------------------------------ F( 8, 60) = 22.97 Model | 1764.16138 8 220.520173 Prob > F = 0.0000 Residual | 576.041518 60 9.60069196 R-squared = 0.7538 -------------+------------------------------ Adj R-squared = 0.7210 Total | 2340.2029 68 34.4147485 Root MSE = 3.0985 ---------------------------------------------------------------------------- -- mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+-------------------------------------------------------------- -- 1.foreign | 16.19956 5.203251 3.11 0.003 5.791513 26.60761 weight | -.005067 .0007408 -6.84 0.000 -.0065488 -.0035853 | foreign#| c.weight | 1 | -.0083102 .0021961 -3.78 0.000 -.0127031 -.0039173 | rep78 | 2 | .2006326 2.583702 0.08 0.938 -4.96754 5.368805 3 | .180679 2.381479 0.08 0.940 -4.582988 4.944345 4 | 1.169124 2.487237 0.47 0.640 -3.806092 6.144339 5 | 5.898554 2.663781 2.21 0.031 .5701987 11.22691 | headroom | -.4860751 .5404865 -0.90 0.372 -1.567209 .5950589 _cons | 37.55845 3.039136 12.36 0.000 31.47927 43.63762 ---------------------------------------------------------------------------- -- . . outreg2 i.foreign##c.weight headroom using `myfile', see factor variables not allowed r(101); On 28 January 2010 19:27, Roy Wada <roywada@gmail.com> wrote: > It's the factor variables in the varlist that was causing the problem. > I sent a fix to Josh. > > Roy > > > On Thu, Jan 28, 2010 at 10:51 AM, Joshua Gottlieb > <jdgottl@fas.harvard.edu> wrote: >> Sorry; I was unclear about my goal. I only want to output some of the >> variables, since I have a large number of other covariates that I >> don't want to report. For example, consider this modification of >> Maarten's example, where I want to prevent outreg2 from exporting >> coefficients on all of the rep78 fixed effects: >> >> *-------------- begin example --------------------- >> sysuse auto, clear >> tempname myfile >> regress mpg i.foreign##c.weight i.rep78 headroom >> outreg2 i.foreign##c.weight headroom using `myfile', see >> *---------------- end example --------------------- >> >> The -outreg2- command here will generate an error, whereas the >> following command will work fine: >> outreg2 headroom using `myfile', see >> >> Thank you very much. >> >> Josh >> >> >> >> On Wed, Jan 27, 2010 at 12:46 PM, Roy Wada <roywada@gmail.com> wrote: >>>> this is in Stata 11.) Do you know if there's any workaround so that I >>>> can choose specific factor variables and interactions to include in my >>>> outreg2 output? >>> >>> It's not clear what you typed into Stata. If you can replicate the >>> error using -sysuse auto- and send us what you typed, then that would >>> be helpful. >>> >>> Roy >>> >>> * >>> * 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/ >>> >> >> * >> * 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/ >> > > * > * 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/ > * * 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/ * * 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/

**References**:**Re: st: Factor variables and outreg/outreg2***From:*Mirko <mirko.moro@gmail.com>

- Prev by Date:
**Re: st: documentation Stata tips : any wrong with counting on googling?** - Next by Date:
**Re: st: R: Power Analysis** - Previous by thread:
**Re: st: Factor variables and outreg/outreg2** - Next by thread:
**st: Creating time-dependent covariates to replicate the tvc option for stcrreg** - Index(es):