Hi,
Is there any way to replace missing values in "response" variable with non missing values in the same variable by ID ?
In the table below you can notice some of the values in the "response" variable are missing by ID. I need replace the missing values in the "response" variable with the rest of the non-missing values in same variable (please not that non missing values are same within "response" variable by ID). Is there any way to modify the "response" variable as "Desired_response" vairable?
Thanks.
Is there any way to replace missing values in "response" variable with non missing values in the same variable by ID ?
In the table below you can notice some of the values in the "response" variable are missing by ID. I need replace the missing values in the "response" variable with the rest of the non-missing values in same variable (please not that non missing values are same within "response" variable by ID). Is there any way to modify the "response" variable as "Desired_response" vairable?
ID | response | Desired_response |
1 | 2 | 2 |
1 | 2 | 2 |
1 | . | 2 |
1 | . | 2 |
2 | 1 | 1 |
2 | . | 1 |
2 | 1 | 1 |
Thanks.
Comment