In addition to Kit's comment, and no doubt others to come, do note that
we cycled round related issues in the thread started earlier this week
by Shehzad Ali
<http://www.hsph.harvard.edu/cgi-bin/lwgate/STATALIST/archives/statalist
.0808/date/article-962.html>
Nick
[email protected]
Kit Baum
Choudry said:
I have a question. After using the command "keep" or "drop" and running
an analysis, how can i ask stata to use all the data again. The problem
starts when I run command e.g. for a subset of years and later I want to
run command on whole years in the same do file again.
He answered half of his question: he wants to use the -restore-
command. But before doing that he must have the foresight to use -
preserve-:
sysuse auto
summ
preserve
keep if foreign
summ
restore
etc. Admittedly a silly example, as one could just summarize if
foreign, but illustrative.
-help preserve-
*
* 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/