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
Formulating a Parametric Translog Input Distance Function in order to get technical efficiency and elasticity of substitutionI am using a panel data set for the manufacturing industries (firm-level data) for about 20 years, w…
Drop all values other than month-end dates where the dates dont always end on standard monthend say there would be a value 27th May.Hi, I have a file with a date column and 5 other daily return columns. File attached. I use the bel…
How to? Chi test of homogeneity for categorial variablesHi guys, Below i have included a sample of my two categorial variables. How do i perform a Chi^2 te…
Installing "femlogit"Hi there, I am using STATA from a server which is not connected to the internet and therefore does …
Sample sizeHi everyone, Any of you have suggestions on how to calculate a sample size for a finite population?…
Subscribe to:
Post Comments (Atom)
0 Response to Turning education into years of schooling
Post a Comment