I am attempting to create a Cox proportional hazards model with only one explanatory variable. To perform a likelihood ratio test, I know I need a full and reduced model. I also know that a full model would be a separate mean for each group, and a reduced model would use an overall mean for the whole data set. How can I ensure I am setting this up properly in R? In this model z is 1 if the patient had heart surgery, and z is 0 otherwise
I have:
model<-coxph(Surv(time,delta)~z,method='breslow',data=heartdata)
X.lr <- 2*(model$loglik[2]-model$loglik[1])
Does this achieve that? I get an answer I just want to know whether this makes a full vs. reduced model since I don't have other variables to use?