Skip to content

error with effects package.

3 messages · John Fox, Frédéric Hérault

#
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.omit)
 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
#
Dear Frederic,

The effect function won't handle a model with a nested effect.

Sorry,
 John
On
glm(y~A+B+C+E+A:D,contrasts=list(D=contrasts_D),data=mydata,na.action=na.omi
t
http://www.R-project.org/posting-guide.html
#
Dear John,

Thanks for the reply. I will look for another way to compute adjusted 
effect.

Frederic.

John Fox a ?crit :