[R] what actually a logistic regression fits

From: Bin Yue <leffgh_at_163.com>
Date: Thu, 6 Dec 2007 23:17:52 -0800 (PST)

Dear all:

    I did the following because I was not sure what a logistic regression fits ."small.glm" is a glm fit , setting the family to be binomial.

>fitted(small.glm)->p
>log(p/(1-p))->left
> for(i in 1:length(coef(small.glm))){

+ coef(small.glm)[i]*model.matrix(small.glm)[,i]->res[,i] + }
> apply(res,1,sum)->right
> plot(left,right) #I got a straight line whose slope was about 1
Therefore ,I am almost sure that what a logistic regression fits is log(p/(1-p))~b0+b1*x.
Is that right?
Regards,



Best regards,
Bin Yue

student for a Master program in South Botanical Garden , CAS
-- 
View this message in context: http://www.nabble.com/what-actually-a-logistic-regression-fits-tf4960618.html#a14207920
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org 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.
Received on Fri 07 Dec 2007 - 07:22:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 07 Dec 2007 - 08:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.