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
Normality of Residuals in Random Effects ModelDear Statalist, I am currently writing a seminar paper and need some help. I am calculating the fol…
Main effects significance and Interaction terms using logistic regression in stat 16Dear all users, I am interested to examine the effect of emotional IPV on ANC visits differ by women…
Create a counting variableHello everyone, I'm new to Stata programing and need some help. I'm currently cleaning and adjustin…
How to overlay two combomarginsplotHi, I need to overlay two different combomarginsplot but I am struggling to do so because this is no…
Estimating Variance Components from ANOVAOne of our reviewers ask us to conduct robustness checks by using ANOVA to estimate variance compone…
Subscribe to:
Post Comments (Atom)
0 Response to stata levelsof
Post a Comment