Hi there,
I'm looking into school standards and want to analyse schools which oversubscribed and undersubscribed. I've made a variable to count this with:
gen capacity_pupils=pupils-capacity //so a school with 500 pupils but a capacity of 400 would get a score of +100 (and vice versa)//
However I'm not at the moment interested with this result as a categorical variable rather than continuous (0 for undersubscribed and 1 for over). So I wanted to recode all my variables in capacity_pupils >0=1 and <0=0 but Stata shouts at me when I try to do that! I've managed to split them apart with:
gen oversub=capacity_pupils if capacity_pupils>0
gen undersub=capacity_pupils if capacity_pupils<0
But now I can't merge them together properly. Has anyone got any ideas of how to do this?
Appreciate any help you can give
Cheers
Max
Array
0 Response to Recoding variables >0 and <0
Post a Comment