Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: sample size reduced significantly

From   Nick Cox <>
To   "" <>
Subject   Re: st: sample size reduced significantly
Date   Fri, 12 Apr 2013 00:36:46 +0100

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


On 11 April 2013 21:16, Yu Chen, PhD <> 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:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index