Hi all,
I would like to change an observation for a variable from one value to another but across the whole time series. For example, if the observation is coding for -66, how would I simply change this to code for missing? This -66 observation appears multiple times hence it would be inefficient to do by hand in say Excel.
I have tried the
command but Stata fails to recognise 'obsID'. I am not even certain that this is the correct code to be using for my desired results.
Does anyone know how to do this?
Many thanks!
I would like to change an observation for a variable from one value to another but across the whole time series. For example, if the observation is coding for -66, how would I simply change this to code for missing? This -66 observation appears multiple times hence it would be inefficient to do by hand in say Excel.
I have tried the
Code:
replace var1 = var1[6] if obsID==5
Does anyone know how to do this?
Many thanks!
Comment