[R] warning message: coxme with package multcomp
Simon Tragust
simon.tragust at biologie.uni-regensburg.de
Mon Apr 16 18:36:31 CEST 2012
Hi
I'm encountering an error/warning when doing multiple comparisons with
the package multcomp on a coxme model.
My data:
I'm looking at the removal of brood from the nest according to three
treatments I applied on the brood.
The brood and the workers caring about the brood in the nest, belonged
to different colonies.
Factor: treatment (3 levels: tx,uv,meta)
Random effect 1: origin of brood
Random effect 2: origin of workers
modelling this with
pp.coxme<-coxme(Surv(day,status)~treatment+(1|r.brood)+(1|r.worker),data=p)
gives me first this first warning message:
Warning message:
In coxfitfun(x, y, strata = strata, offset = offset, init = ifixed, :
Loglik converged before variable 1 ; beta may be infinite.
but the output looks ok:
pp.coxme
Cox mixed-effects model fit by maximum likelihood
Data: p; Subset: (brood == "pupae")
events, n = 3, 48
Iterations= 2 42
NULL Integrated Fitted
Log-likelihood -11.07857 -9.559384 -9.557399
Chisq df p AIC BIC
Integrated loglik 3.04 4 0.55143 -4.96 -1.36
Penalized loglik 3.04 2 0.21879 -0.96 0.84
Model: Surv(day, status) ~ treatment + (1 | r.brood) + (1 | r.worker)
Fixed coefficients
coef exp(coef) se(coef) z p
treatmenttx -22.1625984 2.370859e-10 0.00000 -Inf 0.00
treatmentuv -0.6931777 4.999847e-01 1.22475 -0.57 0.57
Random effects
Group Variable Std Dev Variance
r.brood Intercept 0.0199992574 0.0003999703
r.worker Intercept 0.0199992574 0.0003999703
to see if removal is overall dependend upon treatment i use the package
multcomp as following with the second warning message:
pp.coxme.glht<-glht(pp.coxme,linfct=mcp(treatment="Tukey"))
summary(pp.coxme.glht,test=Chisqtest())
General Linear Hypotheses
Multiple Comparisons of Means: Tukey Contrasts
Linear Hypotheses:
Estimate
tx - meta == 0 -22.1626
uv - meta == 0 -0.6932
uv - tx == 0 21.4694
Global Test:
Chisq DF Pr(>Chisq)
1 71.94 1 2.217e-17
Warning message:
In cov2cor(covm) :
diag(.) had 0 or NA entries; non-finite result is doubtful
and all pairwise comparisons between treatments are then not possible:
summary(pp.coxme.glht,test=adjusted("Westfall"))
Error in if (!chkcorr(corr)) stop(sQuote("corr"), " is not a correlation
matrix") :
missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In cov2cor(covm) :
diag(.) had 0 or NA entries; non-finite result is doubtful
2: In cov2cor(covm) :
diag(.) had 0 or NA entries; non-finite result is doubtful
I think this is because one of the levels of the factor treatment has
only cencored data. Using the function coxph instead of coxme gives me
the same first warning message on the model, but not the second warning
/ error message doing multiple comparisons of the treatment levels.
My question is: Am I doing something fundamentally wrong or is it not
possible to get multiple comparisons on a coxme model if one of the
levels of a factor has only cencored data?.
Many thanks in advance!
Simon
--
Simon Tragust
Animal Ecology I
University of Bayreuth
More information about the R-help
mailing list