Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Generating a New Variable


From   "SULE OCHAI" <suo100@psu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Generating a New Variable
Date   Wed, 11 May 2005 14:33:01 -0400 (EDT)

Hi all:

I need some help. I have a longitudinal dataset that I'm using for survival
analysis. In the dataset, I have a variable called Participation (yes=1 & 0
otherwise). Now I want to create a new variable called "Quit" or "Exit". To
create the new variable, my idea is that if an individual records "1" in year
t, I want him to move out of the risk set in year t+1. So, the question is how
do I go about creating the new variable I like to call QUIT!

Thank you.

Sul

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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