I have six dependent variables (count data) and several independent variables, I see that in a MMR the script goes like this:
my.model <- lm(cbind(DV1,DV2,DV3,DV4,DV5,DV6) ~ IV1 + IV2 + ... + IVn)
But, since my data are counts, I want to use a generalized linear model and I tried this:
my.model <- glm(cbind(DV1,DV2,DV3,DV4,DV5,DV6) ~ IV1 + IV2 + ... + IVn, family="poisson")
And appears this error message:
Error in glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, :
(subscript) logical subscript too long`
Can anyone explain me this error message or a way to solve my problem?
lm
does when you give it a matrix? $\endgroup$lm(cbind(DV1,DV2,DV3,DV4,DV5,DV6) ~ IV1 + IV2 + ... + IVn)
I must $\endgroup$lm(cbind(DV1,DV2,DV3,DV4,DV5,DV6) ~ IV1 + IV2 + ... + IVn)
I must use the manova() command like this:summary(manova(my.model))
to do a multivariate analysis of variance and see the significance of each independent variable. That is the final target. $\endgroup$summary
will give them to you for each DV. $\endgroup$