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
State-of-the-art weighting methods when analyzing multiple surveys at the same timeDear Statalist: This is a bit of a longshot, but I was wondering if anyone had good references for …
Flow ControlHi all! I'm trying to create a situation where I can check a set of country/state names (education_…
separate regression of subgroupsHope you are enjoying the coziness of the weekend or early Monday already!. I have a data set with t…
Generate variable to subtract current value from previous valueHello. I am working with the NYT COVID-19 data. The data presents two years worth of COVID-19 case a…
Controlling for both level and difference in variables between partnersUsing panel data, I'd like to measure the effect of life satisfaction in couples on generated wealth…
Subscribe to:
Post Comments (Atom)
0 Response to Turning education into years of schooling
Post a Comment