Dear all,
I am a bit stuck. I have household and personal id date for 8 rounds, however not each person is recorded in every round. I would like to recode a variable and replace its value with the value of the round before. My data looks the following:
ID HHID Round Y
1 1 1 1
2 1 1 0
3 1 1 2
3 1 2 .
How can I replace the missing value for Y for ID 3 in round 2 with the value of 2 for y from round 1 ?
Thank you very much!
Related Posts with Replace Values by previous values
coefplot : groups() option not producing desired resultsHi Stata users, I am using coefplot in Stata 15 to try and replicate the graph below where there are…
Splitting up survival analyses by follow-up timeHi all, I have a dataset I am analysing using survival analyses, with multiple records per patient.…
Multiple imputations: Predicting missing for selected categoriesHi I'm currently trying to use multiple imputation for a register based cohort analysis on maternal…
reghdfe, clustering and crit. values -> adjusted?Dear all, I am using reghdfe and have few clusters. Throughout, I Wild-Cluster bottstrap my p-value…
Dropping variables based on date availabilityHello, I am struggling with cleaning my data. Array I have panel data regarding banks. I would li…
Subscribe to:
Post Comments (Atom)
0 Response to Replace Values by previous values
Post a Comment