Skip to content
Back to formatted view

Raw Message

Message-ID: <1350461452439-4646431.post@n4.nabble.com>
Date: 2012-10-17T08:10:52Z
From: rm
Subject: Problems with coxph and survfit in a stratified model with interactions
In-Reply-To: <30411786F64EEF46856EFBA2CD917799D4DD05@UHEXMBSPR03.umhs.med.umich.edu>

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.