i have currently got a variable which can take the values 1 or 0. i want to
create a new variable which takes the values of the old one but which will
be equal to 0 once the number of 0 values in the old variable exceeds 200.
the code i have used is
generate y = progid
recode y = 0 if ( _(progid==0)>200)
is that correct?
the reason is that i am doing a survival study where i want to recode the
observations as censored once 200 failures have occurred.
*
* 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/