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
Generate random numbers with specific mean and standard deviation within a rangeHello, I am using STATA 14 and would like to generate some random numbers that have a specific mean …
Difference-in-difference with categorical outcome variableHi everyone, I want to use the Diff command in Stata to run a propensity score matching diff-in-dif…
Tabulate a variable to include a value for which there are no observationsHi, I am trying to tabulate a variable & then use matcell/matrow to build an output table with …
Creating ratio variable from two independent variables for panel dataHi all. I am using educational attainment data and I have data on female tertiary enrolment(%), male…
All characters of a variable are not displayed when I import the excel data. only 1st 27 characters are shown. Please HELP!For example "AgeofPersonAnsweringtheQuest" , only AgeofPersonAnsweringtheQues is displayed when I im…
Subscribe to:
Post Comments (Atom)
0 Response to Drop Observations which are contained more than once in Panel Data
Post a Comment