Skip to content
Back to formatted view

Raw Message

Message-ID: <loom.20090208T172502-690@post.gmane.org>
Date: 2009-02-08T17:35:48Z
From: Dieter Menne
Subject: glmmBUGS: logistic regression on proportional data

David Winsemius <dwinsemius <at> comcast.net> writes:

> >>
> >> Newdat<-data.frame(Newtree=rep(1:3, each=20), Newsect=rep(c("a","b"),
> >> each=10), Newdist=rep(1:5, 2),
> >>                   y=rpois(60,2), tot=rep(c(14,12,10,8,6), 12))
> >>
> >> yseed<-cbind(Newdat$y, Newdat$tot)
> >>
> >> mod<-glmmBUGS(yseed~Newsect + Newdist, effects="Newtree",
> >> family="binomial", data=Newdat)
> >>
> >
> > First, a typo, there is no yseed. Second, after the error message
> > "must be between 0 and 1", this looks more like poisson, because
> > you have the counts, not the events.
> 
> Puzzled. I see yseed defined above as a two column vector, as is  
> sometimes used to handle grouped data input to the glm response side  
> of a formula.

Sorry, my short-circuit. You example is in analogy to the budworm example
in MASS, giving successes and failures. I have no solution, but a quick
look shows that the formula interface of glmmPQL is called, so you
might cross check if glmmPQL support the success/failure form. I am not
on an R machine currently to check it.

Dieter