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, statalist.org 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 <philipp.rehm@gmx.de>
To   statalist@hsphsun2.harvard.edu
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).

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

HTH,
Philipp

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

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

Claude




*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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