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

st: Re: missing values

From   Kit Baum <>
Subject   st: Re: missing values
Date   Wed, 18 Nov 2009 10:12:35 -0500

I'm not sure -nmissing- is the answer here, as this involves listwise deletion: any observation with a value missing in any variable in the regression will be dropped. Something like this will test for that:

sysuse auto,clear
replace turn = . if foreign & mod(_n,2)
replace weight = . if !foreign & !mod(_n,2)
nmissing price rep78 turn weight

g ts1 = rep78+turn
g ts2 = rep78+weight
g ts3 = turn+weight
g ts4 = rep78+turn+weight
g ts5 = length+displacement+gear_ratio
su ts*

The N reported by summarize is the number of cases that would enter the regression, given these regressors.

On Nov 18, 2009, at 2:33 AM, statalist-digest wrote:

> I'm using windows XP and stata 9.2. I'm running some econometric
> models and when I got the output I can see the number of observations
> that were used in the estimation.
> Since my database has several missing values for almost all variables
> I would like to know if there is some command-function that allow me
> to see which combination of variables will produce the regression with
> the highest avaialble number of non-missing observations.

Kit Baum   |   Boston College Economics & DIW Berlin   |
                              An Introduction to Stata Programming  |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

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