[R] Correct nested design for GLM

Walmes Zeviani walmeszeviani at hotmail.com
Wed Mar 3 13:45:38 CET 2010


I guess your model specification is incoherent. It's seems to me that you
incorporated some kind of lmer() style with "(0 + Micro/Trt/Year)" term.
Consider the toy data and code below. Nesting model is m2. Models m1 and m3
are the same so showing that terms in brackets don't are used.

da <- expand.grid(A=factor(1:3), B=factor(1:3))[rep(1:9, 3),]
da$y <- rnbinom(da$A, size=10, prob=0.5)

m1 <- glm.nb(y~A*B, data=da)
anova(m1)

m2 <- glm.nb(y~A/B, data=da)
anova(m2)

m3 <- glm.nb(y~A*B+(A/B), data=da)
anova(m3)

Bests.
Walmes Zeviani.

-----
..ooo0
...................................................................................................
..(....)... 0ooo...                              Walmes Zeviani
...\..(.....(.....)...     Master in Statistics and Agricultural
Experimentation
....\_)..... )../....       walmeszeviani at hotmail.com, Lavras - MG, Brasil
............
(_/............................................................................................
-- 
View this message in context: http://n4.nabble.com/Correct-nested-design-for-GLM-tp1576038p1576483.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list