Displaying 1 result from an estimated 1 matches for "educrec".
2003 Sep 08
1
problems with categorical variables
...ional achievement, with 6 levels: "illiterate", "primary",
"junior high school", "high school completed", "undergraduate", and
"postgraduate").
I want to collapse the 6 levels to a 4-level categorical variable (let's
call it "educrec", with the following levels: "postgraduate",
"undergraduate", "some schooling" and "illiterate").
I initially tried the following code:
x <- table(EDUC)
educrec <- c(x[1], x[2], (x[3]+x[4]+x[5]), x[6]))
table(educrec) gives me the tally coun...