I have a number of variables that are in string format but lend themselves to being numerically coded. There are a number of missing values that were originally coded as -9, -10, 999.
I used the command -encode- to generate my numeric variables. The missing values have also been encoded. I couldn't assign them as MVs using -mvdecode-
foreach v in Asthmapmed2freq_8 Asthmapmed1freq_8 Asthmapmed1freqex_8 Asthmapmed4freq_8 Asthmapmed3freq_8 {
encode `v', ge(c`v')
}
This didn't work:
mvdecode c*, mv(-9=.a \-10=.b \999=.c)
I would be grateful for any advice. Many thanks!
I used the command -encode- to generate my numeric variables. The missing values have also been encoded. I couldn't assign them as MVs using -mvdecode-
foreach v in Asthmapmed2freq_8 Asthmapmed1freq_8 Asthmapmed1freqex_8 Asthmapmed4freq_8 Asthmapmed3freq_8 {
encode `v', ge(c`v')
}
This didn't work:
mvdecode c*, mv(-9=.a \-10=.b \999=.c)
I would be grateful for any advice. Many thanks!
Comment