[R] Is there any way of weighting individual data points in a logistic regression

David Schoeman david.schoeman at gmail.com
Fri Oct 26 08:31:12 CEST 2012

Dear all. Apologies if I am asking a stupid question, but I have been unable to find a solution so far. 

I would like to run a logistic regression in which individual data points are assigned different weights (related to my confidence in their validity). These individual observations are binary (success/failure). My intuition was to use the "weights" option in the vlm function. Something along the lines of:
	mod1 <- glm(success ~ beach - 1, weights = confidence, data = dat, family = binomial), 
where success is binary (1/0), beach is a factor and weights are either 1 (full confidence) or 0.5 (less confidence).

When I ran into the "non-integer #successes in a binomial vlm!" error, and read the help files, I realised my error (in binomial glm, weights set the number of trials). It's good to know WHY my approach was wrong, but it would be better to know how to conduct my analysis correctly.

Any ideas appreciated.


More information about the R-help mailing list