Displaying 1 result from an estimated 1 matches for "yfit_glm_1".
2007 May 28
0
Curve crosses back to origin in plot
Another sample problem: In the Windows version of R-2.5.0,
data(GHQ,package='HSAUR')
layout(1)
GHQ_glm_1<- glm(cbind(cases,non.cases) ~ GHQ, data=GHQ, family=binomial())
summary(GHQ_glm_1)
yfit_glm_1<- predict(GHQ_glm_1, type='response')
layout(1)
plot(probs ~ GHQ,pch=1,col=1,ylab='Probability(Case)', data=GHQ)
lines(yfit_glm_1 ~ GHQ, pch=3,col=3, data=GHQ)
legend("topleft", c("linear", "logistic"), pch=c(2,3), col=c(2,3))
Everything is fine, bu...