Robert Long Robert Long - 1 year ago 188
R Question

Warning: non-integer #successes in a binomial glm! (survey packages)

I am using the

package to create propensity scores, which are used as weights in a binomial glm using
. The code looks something like this:

pscore <- ps(ppci ~ var1+var2+.........., data=dt....)

dt$w <- get.weights(pscore, stop.method="es.mean") <- svydesign(ids=~1, weights=~w, data=dt,)

glm1 <- svyglm(m30 ~ ppci,,family=binomial)

This produces the following warning:

Warning message:
In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!

Does anyone know what I could be doing wrong ?

I wasn't sure if this message would be better on stats.SE, but on balance I thought I would try here first.

Answer Source

There's nothing wrong, glm is just picky when it comes to specifying binomial (and Poisson) models. It warns if it detects that the no. of trials or successes is non-integral, but it goes ahead and fits the model anyway. If you want to suppress the warning (and you're sure it's not a problem), use family=quasibinomial instead.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download