I'm trying to remove specific phrases each time they occur in every value label of my dataset. For example, I want to remove the text "[DON'T READ]" in the label "[DON'T READ] Don't know".
This problem is similar to this resolved Statlist question, except I am trying to change value labels and not variable labels.
I tried this, but I get an r(198) "invalid syntax" error. Perhaps am going about this in entirely the wrong way. Is it even possible to do this?
This problem is similar to this resolved Statlist question, except I am trying to change value labels and not variable labels.
I tried this, but I get an r(198) "invalid syntax" error. Perhaps am going about this in entirely the wrong way. Is it even possible to do this?
Code:
foreach i of varlist _all { local a : value label `i' local a: subinstr local a "[DON'T READ] " "" label define `i' "`a'" }
Comment