Hi Chris,

Yes, that is exactly the model I want to fit, i.e. a separate 'baseline'
hazard for each stratum (defined by cov1) and a coefficient for cov2 that is
different for each stratum. 

Is suspect that there is a problem with the following line of your code. 

sCox <- coxph(Surv(time, status) ~ strata(cov1) + cov2 + cov1 :cov2,
data=lung) # warning, X matrix singular 

The reason why I suspect is that in an earlier  post
<http://r.789695.n4.nabble.com/Re-Problems-with-coxph-and-survfit-in-a-stratified-model-with-interactions-td4646171.html>
  
Terry wrote that ” ..by using ~ strata(cov1) + cov1:cov2 you fooled the
program into thinking that there was no strata by covariate interaction, ” 

Best regards,
Roland




--
View this message in context: 
http://r.789695.n4.nabble.com/Problems-with-coxph-and-survfit-in-a-stratified-model-with-interactions-tp4646096p4646431.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to