Dear list,
I tried to apply the logistic regression to different response variables
from a dataframe and would like to store the results using the function
logistic.display from the "epicalc" package in a list, but got an error message
"Error in eval(expr, envir, enclos) : y values must be 0 <= y <= 1". All the
response variables have value of 0 or 1. It worked well for summary and anova
but not for logistic.display in the loop.
Thanks for any help,
Tom
logreg1<-vector("list", length(l))
logreg.anov1<-vector("list",length(l))
logreg.summ1<-vector("list",length(l))
logreg.conf1<-vector("list",length(l))
for (i in c(13:16)){
logreg1[[i-x]]<-glm(dat[,i]~group + age, family=binomial, data=Ndat)
logreg.anov1[[i-x]]<-anova(logreg1[[i-x]])
logreg.summ1[[i-x]]<-summary(logreg1[[i-x]])
logreg.conf1[[i-x]]<-logistic.display(logreg1[[i-x]], crude=FALSE)
}
---------------------------------
Går det långsamt? Skaffa dig en snabbare bredbandsuppkoppling.
Sök och jämför priser hos Kelkoo.
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.