Ivan Allaman
2010-May-18 13:18 UTC
[R] Using the zero-inflated binomial in experimental designs
I'm trying to use the inflated binomial distribution of zeros (since 75% of the values are zeros) in a randomized block experiment with four quantitative treatments (0, 0.5, 1, 1.5), but I'm finding it difficult, since the examples available in VGAM packages like for example, leave us unsure of how it should be the data.frame for such analysis. Unfortunately the function glm does not have an option to place a family of this kind I'm about, because if I had, it would be easy, made that my goal is simple, just wanting to compare the treatments. For that you have an idea, here is an example of my database. BLOCK NIV NT MUMI Inicial 0 18 0 Inicial 0 15 0 Inicial 0.5 9 0 Inicial 0.5 19 1 Inicial 1 13 1 Inicial 1 11 0 Inicial 1.5 12 2 Inicial 1.5 10 1 Meio 0 13 0 Meio 0 10 2 Meio 0.5 17 0 Meio 0.5 14 1 Meio 1 13 0 Meio 1 9 0 Meio 1.5 11 0 Meio 1.5 12 1 where: NIV are the treatments; NT is the total number of piglets born; Mumi is the number of mummified piglets NT. Mumi The variable is of interest. If someone can tell me some stuff on how I can do these tests in R, similar to what I would do using the function glm, I'd be grateful. I thank everyone's attention. -- View this message in context: http://r.789695.n4.nabble.com/Using-the-zero-inflated-binomial-in-experimental-designs-tp2221254p2221254.html Sent from the R help mailing list archive at Nabble.com.
Ben Bolker
2010-May-18 16:31 UTC
[R] Using the zero-inflated binomial in experimental designs
Ivan Allaman <ivanalaman <at> yahoo.com.br> writes:> > > I'm trying to use the inflated binomial distribution of zeros (since 75% of > the values are zeros) in a randomized block experiment with four > quantitative treatments (0, 0.5, 1, 1.5), but I'm finding it difficult, > since the examples available in VGAM packages like for example, leave us > unsure of how it should be the data.frame for such analysis. Unfortunately > the function glm does not have an option to place a family of this kind I'm > about, because if I had, it would be easy, made that my goal is simple, just > wanting to compare the treatments. For that you have an idea, here is an > example of my database. > > BLOCK NIV NT MUMI > Inicial 0 18 0[snip]> > where: NIV are the treatments; NT is the total number of piglets born; Mumi > is the number of mummified piglets NT. Mumi The variable is of interest. If > someone can tell me some stuff on how I can do these tests in R, similar to > what I would do using the function glm, I'd be grateful. > I thank everyone's attention.something like comparing the likelihoods of m1 <- vglm(cbind(MUMI,NT-MUMI)~NIV*BLOCK,zibinomial,data=mydata) m2 <- vglm(cbind(MUMI,NT-MUMI)~NIV+BLOCK,zibinomial,data=mydata) m3 <- vglm(cbind(MUMI,NT-MUMI)~BLOCK,zibinomial,data=mydata) I don't know whether the anova() method works for VGLM objects or not. By the way, 75% zeroes doesn't necessarily imply zero-inflation -- perhaps it just means a low incidence?