Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: re: restoring dataset


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: re: restoring dataset
Date   Fri, 29 Aug 2008 13:31:58 +0100

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/



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