Statalist


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

st: RE: RE: Outreg2 and co-linear variables in a regression


From   "sdm1" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Outreg2 and co-linear variables in a regression
Date   Thu, 19 Nov 2009 18:30:16 -0000

Thanks Martin (and Maarten)!

Steve 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin Weiss
Sent: 19 November 2009 17:55
To: [email protected]
Subject: st: RE: Outreg2 and co-linear variables in a regression


<>


You could use Maarten`s -indeplist- tp identify valid covariates. Strangely,
-drop(o*)- does not do the job, so let`s instead -keep-...


*********
clear*
set obs 10000

gen x1=rnormal()
gen x2=x1

gen y= 1+x1+ x2+ rnormal() 

reg y x?

capt which indeplist
if _rc ssc install indeplist

indeplist
outreg2 using myfile, replace keep(`r(X)')
********


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of sdm1
Sent: Donnerstag, 19. November 2009 18:42
To: [email protected]
Subject: st: Outreg2 and co-linear variables in a regression

I'm using outreg2 to write some regression results to a spreadsheet.  In the
regression, some of the variables are co-linear and so Stata (MP11) omits
these from the regression.  Is there a way to prevent outreg2 from writing
these omitted variables to the spreadsheet (it prefixes the variable names
with 'o.' and gives them a zero coefficient and standard error) without
dropping them from the regression specification?

Thanks.

Steve
   

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



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