Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: stata drops variable at random


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   st: RE: stata drops variable at random
Date   Sun, 9 Dec 2007 17:33:35 -0000

Marck,

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Marck Bulter
> Sent: 09 December 2007 17:24
> To: [email protected]
> Subject: st: stata drops variable at random
> 
> Dear all,
> 
> Currently I am working on a panel data regression. Main 
> problem is that Stata drops variables at random immediately 
> after a performed regression.
> For example if the following regression is performed:
> 
> xtivreg pstrmon price mat age coup pstrmonprev pstrprev intr 
> ivol compl (precmon = price mat age coup pstrmonprev pstrprev 
> intr ivol compl
> precmonprev)
> 
> Stata drops often one of the above variables, or the ID-var 
> or the Time-Var

There's a basic misunderstanding here.  In

xtivreg y x1 x2 x3 (y1 y2 y3 = z1 z2 z3)

the sets of xs, ys and zs shouldn't overlap: the xs are the included
exogenous regressors, the ys are the included endogenous regressors, and
the zs are the excluded instruments.

In your example, you have included all your xs in the list of zs.
Naturally, Stata finds collinearities and drops variables.  The right
way to run the regression in your example is

xtivreg pstrmon price mat age coup pstrmonprev pstrprev intr 
ivol compl (precmon = precmonprev)

Cheers,
Mark

> Any help would be very much appreciated, not much hair left,
> 
> Kind regards,
> Marck Bulter
> 
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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