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: Purging a dataset

From   Philipp Rehm <>
Subject   Re: st: Purging a dataset
Date   Sun, 28 Mar 2010 16:43:09 -0400

You can use e(sample), which is left behind after the regression (you can type "ereturn list" for details).

sysuse auto, clear
reg trunk rep78
gen sample=e(sample)
pwcorr price trunk if sample


On 3/28/2010 4:27 PM, Claude Francoeur wrote:

Does Stata provide a command to create a dataset with the observations
that are used in a regression? For instance, my original dataset
contains 1,324 observations. Some of these observations contain empty
variables that are dropped by Stata when doing a regression (N= 1,264).
I would like to use the tabultae and corr commands on that subgroup
without having to delete the missing observations from my data file.

Thanks for you help


* For searches and help try:

*   For searches and help try:

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