Dear R users,

I have some trouble using the allEffects() function to compute and
display effect plots for a linear model.
My data is quite simple, it concerns effects of 3 treatments on the
tumoral volume of mice. vTum codes for the qualitative initial volume,
from small to big, temps is the time in month since beginning of
treatment, and Série codes for the batch. Data is unbalanced.

> head(data)
           Id Série Traitement vTum temps Volume
55656.1 55656     7          3    1     1  14.03
55805.1 55805     7          3    3     1  59.92
55829.1 55829     7          3    1     1  15.31
55806.1 55806     7          3    2     1  28.01
50725.1 50725     7          3    2     1  34.48
55737.1 55737     7          3    2     1  43.56


The linear model is also quite simple :
> lm1=lm(Volume ~  temps + Traitement:temps + Série , data)

But when I try to use allEffects() I get this error:
> eff.lm1 <- allEffect(mod=lm1,
Error in apply(mod.matrix[, components], 1, prod) : index out of range

I read the help and the example but I don't understand the reason why it
doesn't work. Can you help me ?
Thanks


-- 
Jonas Mandel

______________________________________________
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