Good afternoon, I'm working on my master thesis in Statistics at University of Bologna and I have a problem with my code. I have a dataset as shown in attachment.
I'd like to remove observation within each level of id, when the variable event[_n-1]==0.
For example, i'd like to get:
id event
1 1
1 1
1 0
2 1
2 1
2 1
2 0
and so on.
I tried so many options, but they never worked, I'd like to know if there is a solution.
Thanks a lot.
Anna
Related Posts with stata levelsof
Interflex graph region whiteHi, does anybody know if there is a way to change the background colour from light blue to white wit…
Heckman probit (heckprobit) with fixed effects; observations omitted and not used but same number of observationsHi, I am analyzing different stages of conflict between states. Each episode has an attacking and an…
Differentiating between extended missings in -misstable- or -missings report-Dear Statalist, I am struggling to create a single table of missing values for all variables, that …
Requesting help with outreg2 commandDear Sir/Ma'am, I have been using outreg2 since past many years however suddenly it has stopped work…
Time varying covariate in Cox model: stset with start-stop notationI am currently working on applying a method for assessing vaccine durability proposed by Fintzi and …
Subscribe to:
Post Comments (Atom)
0 Response to stata levelsof
Post a Comment