Please, read the posting guide: - provide a minimal example - tell us from which package the function is coming
I guess you used the function allEffects() from the package effects, and did : eff.lm1 <- allEffect(lm1) Then I guess that there's something wrong with the variables you put into the model. Sure they're factor variables and not numeric? Cheers Joris On Thu, Jun 17, 2010 at 6:03 PM, Jonas Mandel <jonas.man...@curie.fr> wrote: > 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. > -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control tel : +32 9 264 59 87 joris.m...@ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php ______________________________________________ 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.