[R] Res: Using the zero-inflated binomial in experimental designs

Ivan Allaman ivanalaman at yahoo.com.br
Thu May 20 03:23:32 CEST 2010


Hi Ben!

Following his recommendations I did the following:
1st step:
I compared the best model for binomial and binomial inflates.
1.1 Best model for Binomial.

dg$resp.mumi <- cbind(dg$MUMI,dg$NT - dg$MUMI)
dg
names(dg)
mod.mumi.binomial  <- glm(resp.mumi ~ factor(PARTO)*REG, family=binomial,
data = dg)
summary(mod.mumi.binomial)
mod.mumi.binomial1 <- glm(resp.mumi ~ factor(PARTO) + REG, family=binomial,
data = dg)
summary(mod.mumi.binomial1)
mod.mumi.binomial2 <- glm(resp.mumi ~ REG, family=binomial, data = dg)
summary(mod.mumi.binomial2)
pchisq(-2*(logLik(mod.mumi.binomial1)-logLik(mod.mumi.binomial)),lower.tail=FALSE,
    df= 15) 
[1] 0.1354171
pchisq(-2*(logLik(mod.mumi.binomial2)-logLik(mod.mumi.binomial1)),lower.tail=FALSE,
    df= 5) 
[1] 0.06030012

The 5% significance level, we can choose the most parsimonious model, ie the
model "mod.mumi.binomial2".

1.2 Best model for binomial inflates
library(VGAM)
mod.mumi.binomialinflacionada <- vglm(resp.mumi ~
factor(PARTO)*REG,zibinomial, data = dg)
summary(mod.mumi.binomialinflacionada)
mod.mumi.binomialinflacionada1 <- vglm(resp.mumi ~
factor(PARTO)+REG,zibinomial, data = dg)
summary(mod.mumi.binomialinflacionada1)
mod.mumi.binomialinflacionada2 <- vglm(resp.mumi ~ REG,zibinomial, data =
dg)
summary(mod.mumi.binomialinflacionada2)
pchisq(-2*logLik(mod.mumi.binomialinflacionada1)-logLik(mod.mumi.binomialinflacionada)),lower.tail=FALSE, 
df= 15) 
[1] 0.1477837
pchisq(-2*logLik(mod.mumi.binomialinflacionada2)-logLik(mod.mumi.binomialinflacionada1)),lower.tail=FALSE, 
df= 5) 
[1] 0.0989934

The 5% significance level, we can choose the most parsimonious model, ie the
model "mod.mumi.binomialinflacionada2".

2st step:
Compare the best model of the binomial model with the best of inflated
binomial.
pchisq(-2*(logLik(mod.mumi.binomial2)-logLik(mod.mumi.binomialinflacionada2)),lower.tail=FALSE,
    df= 1) 
[1] 0.1929690

There wasn't difference between the models. Must i choose the most
parsimonious model?

Thanks for your attention and sorry for the inconvenience.





-- 
View this message in context: http://r.789695.n4.nabble.com/Using-the-zero-inflated-binomial-in-experimental-designs-tp2221254p2223819.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list