[R] logistic regression: default computed probability
Marc Schwartz
marc_schwartz at me.com
Wed Sep 21 17:49:50 CEST 2011
On Sep 21, 2011, at 10:25 AM, n wrote:
> Hello all,
>
> Suppose in a logistic regression model, the binary outcome is coded as
> 0 or 1.
> In SAS, the default probability computed is for Y = 0 (smaller of the
> two values) . However, in SPSS the probability computed is for Y = 1
> (greater of the two values).
>
> Which one does R compute, the probability for the smaller or the
> greater value?
>
> I went through the documentation in a hurry but couldn't find a clue.
>
> Thanks
>
> Nikhil
>From ?glm in the Details section:
For binomial and quasibinomial families the response can also be specified as a factor (when the first level denotes failure and all others success) or as a two-column matrix with the columns giving the numbers of successes and failures.
So P(Y = 1) if using 0/1.
HTH,
Marc Schwartz
More information about the R-help
mailing list