Hi,
I am trying to replace observations for Var1 for subject 1 (ID=1) with the observations of Var1 for subject 2 (ID=2).
i.e.
So I want to change Var1=. for ID=1 to the value of Var1 for ID=2
Is there a way of coding this similar to below (or a different way)?
replace Var1(for ID=1) = Var1(ID=2)
Thank you in advance
I am trying to replace observations for Var1 for subject 1 (ID=1) with the observations of Var1 for subject 2 (ID=2).
i.e.
ID | Var1 |
1 | . |
2 | 1 |
3 | 0 |
Is there a way of coding this similar to below (or a different way)?
replace Var1(for ID=1) = Var1(ID=2)
Thank you in advance