Hi, I have a dataset which contains longitudinal data. For each subject, there are 2 observations, one from the first time point, one from the second (the variable subject is duplicated). I am trying to replace Var1 with the value 1 only if the values of Var2 are different between the two subject duplicates (i.e. if the value for Var2 changes from the first time point to the second for any given subject). I would be very grateful for some help with coding this! Thanks.
-
Login or Register
- Log in with
Comment