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
How do I do two j for reshape command? Use reshape twice?Hello, I have a wide data set that contains variables: PUBID (individuals ID) startdate__njob_year …
Formatting Several Variables using a Loop Hello I have several variables (68) consisting of strings, integers, and floats. I am trying to for…
Identify life events in panel dataHi Statalist. I would like to be able to identify life events within a panel dataset with multiple w…
How to resolve numeric overflow while performing xtlogit,fe in stata?Dear all, Apologies if this question seems to be a repetition of a previous question. I had made som…
How to match two datasets with constraints?Hello, This is my first time posting on this forum so thank you to everyone in advance. The simple…
Subscribe to:
Post Comments (Atom)
0 Response to Non proportionality of Cox model, using piece-wise constant exponential model instead
Post a Comment