Hi,
I am trying to split my time-varying education variable, didn't figure out something. In my data, each observation enters risk after age 14 until their first partnership( both are in the form of CMC-century month code). I am gonna create a variable based on years of schooling information of each observation. Each observation starts education at the age of 6. I grouped years of schooling as follow;
primary:1-4 (1 to 4 years of schooling)
lower secondary;5-10
upper secondary; 11-13
tertiary;13+
I am trying to find in which group an observation falls into before leaving the risk period ( from age 14 to first partnership). I have "birth" "origin14"(risk entrance) and "firstpart"(failure time) variable in CMC format.
gen educage=6+yearsofschooling
label variable educage "age at completion of education"
gen educcmc=educage*12+ birth
stsplit educsp, at(?) after (time=educcmc) here I both confused how I am gonna put my schooling group after "at(?)" and whether "after (time= ) should follow educcmc or origin14?
Thank you in advance
0 Response to Episode splitting
Post a Comment