Hi, I am experimenting with using glht() from multcomp package together with 
coxph(), and glad to find that glht() can work on coph object, for example:

> (fit<-coxph(Surv(stop, status>0)~treatment,bladder1))
coxph(formula = Surv(stop, status > 0) ~ treatment, data = bladder1)


                      coef exp(coef) se(coef)      z    p
treatmentpyridoxine -0.063     0.939    0.161 -0.391 0.70
treatmentthiotepa   -0.159     0.853    0.168 -0.947 0.34

Likelihood ratio test=0.91  on 2 df, p=0.635  n= 294 

> glht(fit,linfct=mcp(treatment='Tukey'))

         General Linear Hypotheses

Multiple Comparisons of Means: Tukey Contrasts


Linear Hypotheses:
                           Estimate
pyridoxine - placebo == 0  -0.06303
thiotepa - placebo == 0    -0.15885
thiotepa - pyridoxine == 0 -0.09582

However, once I added a strata term in the formula of coxph(), then glht() 
can't 
work anymore:

> (fit<-coxph(Surv(stop, status>0)~treatment+strata(enum),bladder1))
coxph(formula = Surv(stop, status > 0) ~ treatment + strata(enum), 
    data = bladder1)


                      coef exp(coef) se(coef)     z    p
treatmentpyridoxine  0.188      1.21    0.170  1.11 0.27
treatmentthiotepa   -0.210      0.81    0.172 -1.22 0.22

Likelihood ratio test=4.39  on 2 df, p=0.111  n= 294 

> glht(fit,linfct=mcp(treatment='Tukey'))
Error in glht.matrix(model = list(coefficients = c(0.187792527684977,  : 
  ‘ncol(linfct)’ is not equal to ‘length(coef(model))’

Can anyone suggest why strata would make coxph object ineligible for glht()? Or 
how to make it work?

Thanks

John


      
        [[alternative HTML version deleted]]

______________________________________________
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