--- begin inclusion --- Response variable: survival (death) Factor 1: treatment (4 levels) Factor 2: sex (male / female) Random effects 1: person nested within day (2 people did the experiment over 2 days) Random effects 2: box nested within treatment (animals were kept in boxes in groups of 6, and there were multiple boxes per treatment)
I've read the introductions to coxme by Terry Therneau, and something like the following is what I think I should use: model1<-coxme(Surv(death,censor)~treatment*sex+(1|day/person)+(1| treatment/box)) --- End inclusion --- That looks right to me. Your questions: 1: How to test: As you guessed, fit the model without one of the random effects and compare the integrated likelihood for the two fits. The usual "is it a chisq or sum of chisquares" question from random effects models applies -- the simple chisq test will be conservative. 2: (treatment |box) term. For a factor variable such as treatment a term (1 | treatment/box) specifies a (random) coefficient for each treatment by box combination. The term (treatment|box) is asking for exactly the same thing, but coxme currently does not support asking for it in that way. 3. I do not have an extension of cox.zph to the mixed effects model, in either theory or code. Residuals methods for coxme would be an important addition and is on my to-do list. (But as my wife would point out, so is a bathroom remodel and she isn't holding her breath.) ______________________________________________ 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.