Statalist


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

Re: st: outreg2 with xtivreg


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   Re: st: outreg2 with xtivreg
Date   Sun, 12 Apr 2009 16:31:22 +0200

<>

Roy,

how would I go about this business with the official help file example for -xtivreg-?

****
webuse nlswork, clear
generate age2 = age^2
generate byte black = (race==2)
xtivreg ln_w age* not_smsa black (tenure = union birth south), re first
reg tenure  union birth south age* not_smsa black if e(sample)
****

Seems that -e(sample)- is not enough here to replicate the frist stage?



HTH
Martin
_______________________
----- Original Message ----- From: "Roy Wada" <[email protected]>
To: <[email protected]>
Sent: Sunday, April 12, 2009 12:05 PM
Subject: RE: st: outreg2 with xtivreg



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


I am using outreg2 to import the results of stata. However, I have
noticed that outreg2 does not include the regressions from the first
estimation (reduced form with the instruments). It only presents the
main equation.
I have tried the option onecol but it does not work either.

Is there a solution to this?

Thank you
Ana
_________________________________________________________________
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/


*
*   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