Dear Stata Community,
I have the following dataset:
Household_ID Personal_ID Round
1 1 1
1 2 1
1 2 2
1 3 2
2 1 1
2 1 2
I basically want to drop the observations in BOLD in order to create a cross sectional dataset, where each observation if recorded in round 1 and 2 only appears in the latest round. Ideally my dataset then would look like:
Household_ID Personal_ID Round
1 1 1
1 2 2
1 3 2
2 1 2
Anyone has an idea on how to code this?
All the best!
Related Posts with Drop Observations which are contained more than once in Panel Data
How to split numeric variables based on ruleHi Stata folks, I am working on a dataset where each ID is associated with a numeric value comprised…
Capturing confidence intervals in newly generated variablesHi, I'm using the following code to determine the 95%CI of a proportion: cii means n_sample n_case…
Combining two variables into one decimalHi all, I'm sure this is a relatively easy thing to do once you know the syntax, but essentially I h…
subtracting datesPlease help. In my data set the dates are in the format: 17dec2016 00:00:00. I am trying to subtract…
Download (install) all packages in SSC?Dear All, Is it possible to install all the packages in SSC using one simple command (whatever that …
Subscribe to:
Post Comments (Atom)
0 Response to Drop Observations which are contained more than once in Panel Data
Post a Comment