I am trying to estimate variance components from a complex random effects 
survival model using coxme (Package version 2.2-5). I am having problems 
specifying interaction effects in the random terms. I wonder if this is simply 
not implemented in coxme yet.

For instance, using the model

coxme(Surv(DeathAge,Dead) ~  treatment + (1 | block/tank))

Works fine (tank nested within block), but 

coxme(Surv(DeathAge,Dead) ~  treatment + (1 | block) + (1 | block:tank))

fails with "Error in getgroups(f2$group, m) : Invalid grouping factor 
block:tank”.

By my understanding of model specification in R, these should be equivalent 
statements (assuming that that the tank effects have been coded appropriately 
as unique within blocks). Any interaction specified using “:” appears to fail.

I am actually interested in much more complex models but can’t seem to be able 
to specify any interactions effects. For instance a factorial model like,

coxme(Surv(DeathAge,Dead) ~  treatment + (1 | room*block))

fails with "Error in getgroups(f2$group, m) : Invalid grouping factor room * 
block”.

Since I can’t directly specify the interaction effects and the factorial 
operator “*” does not seem to work, I appear to be SOL. It seems that only 
nested effects specified by the “/“ operator are allowed. Multiple nesting is 
also OK, which is great for a single hierarchical nesting design, but not 
sufficient for more complex random effects models.

Any thoughts would be most welcome.

Thanks, Patrick



 

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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