Statalist


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

RE: st: outreg2 with xtivreg


From   Roy Wada <roywada@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: outreg2 with xtivreg
Date   Sun, 12 Apr 2009 03:11:15 -0700

 
There should have been -fe- option in the second -xtivreg- for fixed
effects.

*** for fixed effects
sysuse auto, clear
xtivreg headroom (rep78=gear turn) trunk length, i(foreign) first fe
xtreg rep78 trunk length gear turn if e(sample)==1, fe
outreg2 using myfile, replace
xtivreg (rep78=gear turn) headroom trunk length, i(foreign) fe
outreg2 using myfile, sortvar(rep78) see
 
And, yes, this will work with -ivreg2-, too. And with any other
table-making programs.
 
 

> Yes, you can. The trick is to use e(sample) to make sure
> you are using the same sample. Just remember that the
> first-stage must include all right-hand side variables,
> including the instruments.
>
> Incidently, this will work with -ivreg- as well.
>
> ** for random effects
> sysuse auto, clear
> xtivreg headroom (rep78=gear turn) trunk length, i(foreign) first
> reg rep78 trunk length gear turn if e(sample)==1
> outreg2 using myfile, replace
> xtivreg (rep78=gear turn) headroom trunk length, i(foreign)
> outreg2 using myfile, sortvar(rep78) see
>
> *** for fixed effects
> sysuse auto, clear
> xtivreg headroom (rep78=gear turn) trunk length, i(foreign) first fe
> xtreg rep78 trunk length gear turn if e(sample)==1, fe
> outreg2 using myfile, replace
> xtivreg (rep78=gear turn) headroom trunk length, i(foreign)
> outreg2 using myfile, sortvar(rep78) see
>
> _________________________________________________________________
> Quick access to your favorite MSN content and Windows Live with Internet Explorer 8.
> http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
> *
> * 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/
_________________________________________________________________
Rediscover Hotmail®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index