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
NAs and missing valuesI am a stata novice, using stata for the first time in life. I have multiple variables as strings (…
Allocating particular values based on an identifierHello! I am fairly new to stata, and I have spent quite some time on this website to find a solutio…
sample selection under many restrictionsHi, I have a (panel) dataset that contains observations with the following variables: company (abou…
How to add fixed regressors in NARDL modelHi My questions are on Nonlinear and Asymmetric Autoregressive Distribution Lag Model (NARDL) 1. Ho…
How to do the Interaction plot with continuous variables and constrain other control variables at meanTo whom can solve this problem: Please kindly help! I need to draw an interaction plot figure to se…
Subscribe to:
Post Comments (Atom)
0 Response to Replace Values by previous values
Post a Comment