Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Purging a dataset


From   Philipp Rehm <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index