Statalist


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

st: re: restoring dataset


From   Kit Baum <kitbaum@mac.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: re: restoring dataset
Date   Fri, 29 Aug 2008 08:17:41 -0400

< >

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-


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
* 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   |   What's new   |   Site index