I have a dataset regarding patients who might have a hospitalization during the study period ( 5 years). I divided the study period into three phases and created a label variable, called Period, to identify in which phase the hospitalization occurred. I have to implement a cox model using these covariates: age, Period and sex. The study's aim is to estimate the risk of hospitalization over the different phases.
I have one question:
2) The phases have different lasts and change over time, how I can include this in the model?
For more clarity:
I have one question:
2) The phases have different lasts and change over time, how I can include this in the model?
For more clarity:
ID | Sex | Age | Period | Hosp(0/1) |
1 | F | 22 | First | 1 |
1 | F | 23 | Third | 0 |
2 | M | 34 | First | 1 |
2 | M | 34 | Second | 0 |
2 | M | 35 | Third | 1 |
Comment