Array
Code:
gen educ = 1 if (q15_educ == "High school graduate, diploma or equivalent") | (q15_educ == "Some high school") | (q15_educ == "Trade/Technical/vocational training") replace educ = 2 if (q15_educ == "Associate degree") | (q15_educ == "Bachelor's degree") | (q15_educ == "Some college credit, no degree") replace educ = 3 if (q15_educ == "Doctorate degree") | (q15_educ == "Master's degree")
0 Response to a better method of generating a variable?
Post a Comment