Hello everyone,
I currently have a categorical variable for education ( let's call it educ) which is divided into the following categories:
---------+-----------------------------------
Degree | 1,415 33.36 33.36
Other higher | 529 12.47 45.83
A level etc | 769 18.13 63.96
GCSE etc | 783 18.46 82.41
Other qual | 416 9.81 92.22
No qual
I am trying to turn this into years of schooling (educ_n), but I am struggling.
What I am trying to do is basically combine:
GCSE, other qual and no qual and turn them into 0<years of schooling<12
A level and other higher and turn them into 12=< years of schooling <13
Degree years of schooling>=13
My code is as follows so far:
generate educ_n=.
replace educ_n>0 & educ_n<=10 if educ==4&5&9
but it says > is an invalid command.
Could I please get some help?
Related Posts with Turning education into years of schooling
Dummy Variable as Dependent Variable in a Panel RegressionGood Day Everyone! I am doing a panel regression on have a problem in running panel models in Stata…
Error when use xtcsd (_variable merge already defined)Hi, I have a problem when I use xtcsd. After I run using xtreg depvar indepvar, fe , and then use "x…
Help with multilevel survival analysisI am currently conducting a study that follows patients over 30 days to see if they have an event. P…
-xtevent- Stata module to estimate and visualize linear panel event-study models now available on SSCIt's been a while since I posted anything to Statalist!!! Thanks to Kit Baum, -xtevent- is now avai…
Merge 2 datasets: individual and county level datasetsI need to merge two datasets. One has individual-level data and the other has county-level data. I…
Subscribe to:
Post Comments (Atom)
0 Response to Turning education into years of schooling
Post a Comment