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
Could you please help with coding "mixed-effects model"?I'd like to ask for advice on coding the "mixed-effects model" to see the percent change in health b…
Specify e(title) to feed to etableWith the option `column(title)` etable is supposed to use the model titles as column headers: Code:…
Disable variable expansionHi, it happens the following, I write for example: Code: use "db.dta" [...] gen year = start + de…
Could you please help with coding "mixed-effects model"?n/a …
Save results of estat ptrends to fileHow can I save the result of `estat ptrends` and `estat granger` to file? I have tried with etable, …
Subscribe to:
Post Comments (Atom)
0 Response to Replace Values by previous values
Post a Comment