Statalist


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

Re: st: cancel a selection and continue working with all the variablesor category of a variable


From   Svend Juul <SJ@SOCI.AU.DK>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: cancel a selection and continue working with all the variablesor category of a variable
Date   Wed, 3 Sep 2008 14:49:53 +0200

Carmen wrote:

I know how I would like to cancel a selection and 
continue working with all the variables or category 
of a variable?

Example:  keep if yearfile=="1996"

and then (cancel select)   cancel the selection and 
working with all the categories: 

======================================================

-preserve- and -restore- do what you want:

    ...
    preserve
    keep if ...
    restore

HTH
Svend
__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone:  +45 8942 6090
Home:   +45 8693 7796
Email:  sj@soci.au.dk
__________________________________________ 

*
*   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