I have this survival data that describes the mortality rate of three types of services (saloon, restaurant and express)over a ten year time study.
The data contains three variables: service type (1=saloon, 2=restaurant, and 3=express), years (an integer from 1 to 11, where 11 means greater than 10 years) and censor.
I have two questions:
1) I have fitted the Cox proportional hazard model, but what are the ways to check the proportional hazard assumption. That is we assume the hazard ratio of each individual and the baseline hazard is independent of time.
2) How to fit a time dependent Cox model in R?
Here are my code:
#Cox Proportional Hazards
cox <- coxph(Surv(Years, Censor) ~ data$`Service Type` )
summary(cox)