I would like to fit a logistic regression model in R. The data collection process results in an un-balanced amount of events and non-events. I could re-sample from the data to re-create the original prevalance of the events, but I would rather use all the data.
The glm() function in R does not use weights as sampling weights, but uses weights as an integer number of trials. From the help page "when the elements of weights are positive integers w_i, that each response y_i is the mean of w_i unit-weight observations". See also this question, Case weighted logistic regression, for more on smapling vs trial weights.
Is there an R package to compute a sampling weighted MLE, or what are other options?
weightsforglmin R , then all the estimations will be adjusted taking into account the weights you specify. – Stat Nov 11 '13 at 21:18