This short video lecture demonstrates how to use the replace and generate commands to insert missing values and to recode a categorical variable in Stata
This is an incredibly convoluted way of generating dummy variables. A way faster way to generate the education dummy variables is clean up the missing categories, and then use the command: tab EDUCATION, gen(educd) This will generate a series of dummy variables educd1 educd2 etc for each of the education categories. Then either stick with the original names or use rename.
can you recode missings in all variables at once? for instance, if all missing variables were coded with a 99, is there a command to replace all 99 to missing in all variables?
Helpful. Thanks
This is an incredibly convoluted way of generating dummy variables. A way faster way to generate the education dummy variables is clean up the missing categories, and then use the command:
tab EDUCATION, gen(educd)
This will generate a series of dummy variables educd1 educd2 etc for each of the education categories. Then either stick with the original names or use rename.
It would be helpful if u do it in R as well.
can you recode missings in all variables at once? for instance, if all missing variables were coded with a 99, is there a command to replace all 99 to missing in all variables?
try using the recode command so
recode VARIABLENAME (-7 -9 = .)
Thank you very much
Thank you Sir
so you have calculated the mean of a categorical variable??????????????