[R] Weighted Logistic Regressions using svyglm

Peter Ehlers ehlers at ucalgary.ca
Tue Oct 20 07:43:14 CEST 2009

Fulton wrote:
> I’m running some logistic regressions and I’ve been trying to include weights
> in the equation.  However, when I run the model, I get this warning message:
> Here’s what it says:  Warning message: In eval(expr, envir, enclos) :
> non-integer #successes in a binomial glm!  
> I think it is because the weights are non-integer values.
> What is a good way to run logistic regressions in R when using non-integer
> weights?
> I’ve attached the output from the R console of the two different methods
> I've tried.
> The first regression is unweighted.  The second regression includes the
> weights in glm.  The third regression includes the weights in svyglm. 
> However, despite using the same weights, I get contradicting results. 
> Perhaps I am misunderstanding how to use one or both of these functions.

You might be misunderstanding the use of weights in a binomial glm.
An excerpt from ?glm:

  "For a binomial GLM prior weights are used to give
   the _number of trials_ when the response is the
   _proportion of successes_"

  -Peter Ehlers

> I'd appreciate any help you can provide.
> Thanks
> Brad
> http://www.nabble.com/file/p25969499/Regressions%2Bwith%2BWeights.txt
> Regressions+with+Weights.txt 

More information about the R-help mailing list