[R] error with effects package.
John Fox
jfox at mcmaster.ca
Wed Mar 18 15:40:00 CET 2009
Dear Frederic,
The effect function won't handle a model with a nested effect.
Sorry,
John
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
> Behalf Of Frédéric Hérault
> Sent: March-18-09 9:57 AM
> To: r-help at r-project.org
> Subject: [R] error with effects package.
>
> Dear R helpers,
>
> I have the following model
>
> model_1<-
>
glm(y~A+B+C+E+A:D,contrasts=list(D=contrasts_D),data=mydata,na.action=na.omi
t
> )
> with: options(contrasts=c("contr.sum", "contr.poly"))
>
> A,B and E are 2-levels factor,
> C is covariate,
> D is 20 levels factor with 10 in relation with the first levels of
> factor A, the other in relation with the second levels of factor A
>
>
> Here is my data, and the contrast I use for factor D.
> https://depot.jouy.inra.fr/get?k=xzsA9nLhQSNbzq55MXo
>
> I'm trying to use the effects package of Prof. J. Fox ,
>
> (eff_model_1<-effect("A",model1))
>
> but I get this error message:
> " Error in apply(mod.matrix[, components], 1, prod) : subscript out
> of bounds"
>
> I suppose that the problem comes from the interaction A:D, but I can't
> find a solution to solve it.
>
> Does anyone know how to solve this problem??
>
> thanks.
>
> --------------------------------
>
> Frederic Herault
> INRA
> France
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list