I found the excellent thread Stata | FAQ: How can I apply the original value and variable labels after using the reshape command?, which gives instructions on how to apply variable labels after reshaping from long to wide.
I am trying to do the same by reshaping wide to long.
I am working with harmonized HRS data. The data looks something like this
where the variable label is commonly described as r#varname:w# R VarDescription, or the same with S or H replacing R when not the respondent but spouse or household is interviewed.
I would like this to take this information, remove the wave number and add to a unique local (i.e. the same local for all wave responses, meaning r1vardescription and r2vardescription should just move into a single local without the number of the survey wave).
This should be possible, but is a bit complicated for the inexperienced programmer. Do you have any ideas?
PS: Why is this important at all? I am reshaping data for easy use among other researchers. I aim to do this to simplify other people`s work.
Edit: an additional complication is constituted by the fact that not for all variables there exists a variable / variable label as this variable may be missing.
I am trying to do the same by reshaping wide to long.
I am working with harmonized HRS data. The data looks something like this
HTML Code:
r2satlifez double %10.0g r2satlifez:w2 R Satisfied with life z-score
I would like this to take this information, remove the wave number and add to a unique local (i.e. the same local for all wave responses, meaning r1vardescription and r2vardescription should just move into a single local without the number of the survey wave).
This should be possible, but is a bit complicated for the inexperienced programmer. Do you have any ideas?
PS: Why is this important at all? I am reshaping data for easy use among other researchers. I aim to do this to simplify other people`s work.
Edit: an additional complication is constituted by the fact that not for all variables there exists a variable / variable label as this variable may be missing.
Comment