I am working with the rates of returns to education. I wish to look at just the first stage to see the impact of a policy (change in compulsory schooling laws) variable on the years in education for individuals. My sample includes individuals between the ages of 14 and 65. I want to do something along the lines of survival analysis using the Cox method, where the individuals who are still in education are right-censored.
So, my equation is: E=a+b*P+c*X+ u
Where E is the years in education, P refers to the policy, and X includes other controls such as age, gender, ethnicity, etc
I used the following commands:
gen policy=0
replace policy=1 if age<25 (since the policy affects only those below the age of 25)
gen censor=1
replace censor=0 if main_activity==student
stset years_in_education, failure(censor)
stcox policy age age2 urban sinhalese female married if age>14 & age<65
I want to then obtain a predicted value for the years in education which I could then substitute back into the main regression, which is:
ln_earnings=E_PREDICTED+c*X+ e
Can I please know how to obtain an appropriate predicted value?
I also tried another route (instead of the Cox method) to have a censored regression (using the "cnreg" command) but that is not supported by stata anymore.
Any advice is appreciated
So, my equation is: E=a+b*P+c*X+ u
Where E is the years in education, P refers to the policy, and X includes other controls such as age, gender, ethnicity, etc
I used the following commands:
gen policy=0
replace policy=1 if age<25 (since the policy affects only those below the age of 25)
gen censor=1
replace censor=0 if main_activity==student
stset years_in_education, failure(censor)
stcox policy age age2 urban sinhalese female married if age>14 & age<65
I want to then obtain a predicted value for the years in education which I could then substitute back into the main regression, which is:
ln_earnings=E_PREDICTED+c*X+ e
Can I please know how to obtain an appropriate predicted value?
I also tried another route (instead of the Cox method) to have a censored regression (using the "cnreg" command) but that is not supported by stata anymore.
Any advice is appreciated
Comment