[R] binomial logistic regression question
majesty
juta.kawalerowicz at stx.ox.ac.uk
Tue Sep 27 13:53:28 CEST 2011
Dear subscribers,
I am looking for a function which would allow me to model the dependent
variable as the number of successes in a series of Bernoulli trials. My data
looks like this
ID TRIALS SUCCESSESS INDEP1 INDEP2 INDEP3
1 4444 0 0.273 0.055 0.156
2 98170 74 0.123 0.456 0.789
3 145486 30 0.124 0.235 0.007
4 147149 49 0.888 0.357 0.321
5 60585 11 0.484 0.235 0.235
6 198953 43 0.295 0.123 0.856
I want to find out how independent variables influence the number of
successful trials (dependent variable)
I had tried to use glm formula
regression.glm <- glm( SUCCESSESS ~ INDEP1 + INDEP2 + INDEP3, data = data,
family = binomial, weights= TRIALS)
but got the following: Error in eval(expr, envir, enclos) : y values must be
0 <= y <= 1
but there y has to be between 0 and 1 (which does make sense, but that's why
I am using weights?)
I would be grateful for any hints/suggestions on how to proceed.
Cheers,
Juta
--
View this message in context: http://r.789695.n4.nabble.com/binomial-logistic-regression-question-tp3846954p3846954.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list