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
Related Posts with Episode splitting
Combination of quarters belonging to different year into one yearHi all, I have a dataset with monthly observations, the subset is as follows. However, here in the …
Test for clusteringIn analysing data from a cohort of 6500 children recruited from 3500 families, I would like to exami…
Generating new variable based on the maximum value of a group of variables by countryDear all, I am currently working with a country-level religion adherence dataset which looks as fol…
Reasons for inconsistent estimator in xtbond and xtdpdsysHi, I made xtabond and xtdpdsys estimations, but in each case the parameter of lag dependent variab…
Stata vs. SAS Differences in Repeated Measures AnovaI have uncovered an interesting issue, and am curious if anybody has an explanation for what I am se…
Subscribe to:
Post Comments (Atom)
0 Response to Episode splitting
Post a Comment