[R] the observed "log odds" in logistic regression

Bin Yue leffgh at 163.com
Tue Dec 11 09:05:33 CET 2007


Dieter Menne:
Thank you for your reply!

I know that I don't have to do any logit , but I want to understand how R
fit the glm models.
I will read the examples your suggested .
Best regards,
Bin Yue


Dieter Menne wrote:
> 
> Bin Yue <leffgh <at> 163.com> writes:
> 
>>      After reading the following two links:
>> http://luna.cas.usf.edu/~mbrannic/files/regression/Logistic.html
>> http://www.tufts.edu/~gdallal/logistic.htm
>>      I've known the mathematical basis for logistic regression.However I
>> am
>> still not so sure about the "logit "
>>      For a categorical independent variable, It is  easy to understand
>> the
>> procedures  how "log odds" are calculated. As I know, First the
>> observations
>> are grouped according to the IV and DV, generating a contingency table.
> ..
>>    My problem  is this : in my data set , the IVs are continuous
>> variables,
>> do I still have to generate such a table and compute the log odds for
>> each
>> level of IV according to which the log odds are calculated?  
> 
> Let's assume you are going to use glm in package stats. glm can be fed
> with 
> data in three ways; in your case, you should use the "one-row/one 0-1
> event"
> format, that is the "long" style. You do not have to compute any logit, 
> glm will do that for your.
> 
> The example coming closest to your's is the birthwt example in 
> MASS/scripts/ch07.R  and chapter 7 in Venables/Ripley MASS. Try to
> generate 
> a small, self-running example with a data set similar to your's, and you
> have 
> a good chance to get a more detailed answer.
> 
> Dieter
> 
> ______________________________________________
> 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.
> 
> 


-----
Best regards,
Bin Yue

*************
student for a Master program in South Botanical Garden , CAS

-- 
View this message in context: http://www.nabble.com/the-observed-%22log-odds%22-in-logistic-regression-tp14267125p14269459.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list