Hi,
I am studying union formation and dissolution of first and second-generation immigrants in the host country and compare to natives. I use the Cox proportional hazard model and competing risk model using stcrreg, I have both time constant and time-varying variables. I split the data for time-varying variables at the time point for instance each respondent graduate from primary school, lower secondary, upper secondary and finally tertiary. Covariates are as follows;
Time constants: migration status(3 categories), sex(two categories), birth cohort(3 categories)
Time-varying : education(4 categories), pregnancy(2 categories), parity(3 categories)
1st question
Since proportionality assumption for both the Cox model and competing risk model using stcrreg doesn't hold, I try the piece-wise constant exponential model. After stset and split my data for time-varying variables. I first tried this
xi: stpiece i.cohort i.preg i.numkid, tp(0,60,84,108,132,180,204) tv( i.migstatus i.sex_gen i.eductv) ( I put nonproportional covariates after tv option), but it doesn't give results in tv option as categorical)
So I tried this without using tv option, it works, but I am not sure if this is what I suppose to do?
xi: stpiece i.migstatus i.sex_gen i.cohort i.eductv i.preg i.numkid, tp(0,60,84,108,132,180,204)
2nd question
How to incorporate competing risk model with the piecewise constant exponential model? Do I have to stset my data for competing events separately than use stpiece as below or any other suggestion?
stset beg, failure(typeb=1) origin(origin14) id(id)
split data for timevarying variables
xi: stpiece i.migstatus i.sex_gen i.cohort i.eductv i.preg i.numkid, tp(0,60,84,108,132,180,204)
stset beg, failure(typeb=2) origin(origin14) id(id)
split data for timevarying variables
xi: stpiece i.migstatus i.sex_gen i.cohort i.eductv i.preg i.numkid, tp(0,60,84,108,132,180,204)
Thank you in advance,
Muserref Erdogan
Related Posts with Non proportionality of Cox model, using piece-wise constant exponential model instead
Hello FriendsHello Friends, I ran a MG command and STATA displayed an error message which reads: "invalid new va…
Carhart 4 factor modelHi there, I am currently doing some analysis looking at the affect of CSR on stock returns during a…
help with mergeHello! I really had a headache with merge. I have a dataset with the following relevant variables: …
Formatting data for ARIMA modelingThis is my first post so please excuse any errors. I would like to estimate ARIMA models to understa…
Fill null values within an ordered list.Hi there. In a data structure like this, sorted in ascending order by NUMN, I need to program a rule…
Subscribe to:
Post Comments (Atom)
0 Response to Non proportionality of Cox model, using piece-wise constant exponential model instead
Post a Comment