|
Size: 1017
Comment:
|
Size: 1078
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 9: | Line 9: |
| $$p = \frac{e(a+bx)}{1+ e(a+bx)}$$ where x is the group predictor taking values 0 and 1. | $$p = \frac{e^text{a+bx}}{1+ e^text{a+bx}}$$ where x is the group predictor taking values 0 and 1. |
| Line 11: | Line 11: |
| ln L = n1(a+bx) - n1 ln(1 + e(a+bx)) + n2 - n2 ln(1+e(a+bx)) | ln L = n1(a+bx) - n1 ln(1 + $$e^text{a+bx}$$) + n2 - n2 ln(1+$$e^text{a+bx}$$) |
| Line 13: | Line 13: |
| $$\frac{d}{db} = n1x - n1x \frac{e(a+b)}{1+e(a+b)} - n2x \frac{e(a+b)}{1+e(a+b)}$$ | $$\frac{d}{db} = n1x - n1x \frac{e^text{a+bx}}{1+e^text{a+bx}} - n2x \frac{e^text{a+bx}}{1+e^text{a+bx}}$$ |
| Line 17: | Line 17: |
| $$\frac{d}{db} = \frac{n2 e(a+b)}{(1+e(a+b)}$$. | $$\frac{d}{db} = \frac{n2 e^text{a+b}}{1+e^text{a+b}}$$. |
Estimation in cases of infinite maximum likelihood estimates
We consider a binary outcome (positive/negative) consisting of groups with n1 positives and n2 negatives and the probability of a positive outcome equal to p. Suppose we have a binary group predictor where we only get a positive outcome when x=0 and a negatuive outcome when x=1. The log-likelihood may be written as
ln L = n1 ln p + n2 ln (1-p)
In a binary logistic regression
$$p = \frac{etext{a+bx}}{1+ etext{a+bx}}$$ where x is the group predictor taking values 0 and 1.
ln L = n1(a+bx) - n1 ln(1 + $$etext{a+bx}$$) + n2 - n2 ln(1+$$etext{a+bx}$$)
$$\frac{d}{db} = n1x - n1x \frac{etext{a+bx}}{1+etext{a+bx}} - n2x \frac{etext{a+bx}}{1+etext{a+bx}}$$
Since the positive outcome only occurs in one of the predictor groups we have that all the x=0 scores are in the 'positive' group so
$$\frac{d}{db} = \frac{n2 etext{a+b}}{1+etext{a+b}}$$.
$$\frac{d}{db}$$ =0 for maximum likelihood estimates and $$\frac{d}{db}$$ can only equal zero with infinite estimates of a and b.
