Thank you, Nick.
On Thu, Apr 11, 2013 at 6:36 PM, Nick Cox <njcoxstata@gmail.com> wrote:
>
> Values must be non-missing for all variables entered in a regression;
> otherwise observations will be excluded. After your regression
>
> . regress <whatever>
>
> You can identify the excluded values
>
> . gen excluded = !e(sample)
>
> and then look for missings in the excluded
>
> . egen nmissing = rowmiss(<whatever>) if excluded
> . tab nmissing
>
> Here <whatever> is whatever varlist you used for -regress-.
>
> Nick
> njcoxstata@gmail.com
>
>
> On 11 April 2013 21:16, Yu Chen, PhD <profyuchen@gmail.com> wrote:
>
> > I have several variables with each of them having at least 6000
> > observations (non-missing values). However, when I put them into OLS
> > regression, the number of observations reduced to only about 1000. I
> > cannot figure out what causes the problem. Could you please help me
> > find out the causes? What code can I use to analyze the problem?
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/