Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: dropped variables in regression and saved results (Stata 7)


From   [email protected]
To   [email protected]
Subject   st: dropped variables in regression and saved results (Stata 7)
Date   Tue, 13 May 2003 14:41:11 +0200

Dear list readers,

this is not an urgent question but rather a request for clarification.
I am a little confused about how Stata 7 deals with dropped variables in
regression and hope someone can explain it to me.
I am in a situation where I loop regressions over a certain condition and
save results in a variable, like this:

gen coeff=.
gen stdev=.
foreach d of numlist 1/20 {
      regress y x if whatever==`d'
      replace coeff=_b[x] if whatever==`d'
      replace stdev=_se[x] if whatever==`d'
}

Now, in some cases Stata fails to compute the regression coefficient for x
and says "dropped" in the output. Apart from the question if this
regression makes any sense, I found that Stata saves 0 (zero)  in _b[x],
and not missing value. I am confused by this behaviour, as I expected a
missing value or some error message saying "_b[x] is empty" or so.

Is there any explanation for this? At least theoretically there is a chance
for some regression coefficient being zero (or am I wrong here?).

Thanks a lot and best wishes,
Eva
____________________________________
Eva Poen
University of St. Gallen
Switzerland


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