Chapter 27 A Generalized Linear Model for Binomial Response Data
For all i=1,…,n, yi∼Binomial(mi,πi), where mi is known number of trials for observation i, πi=exp(x′iβ)1+exp(x′iβ), and y1,…,yn are independent. The Binomial log likelihood is ℓ(β∣y)=n∑i=1[yix′iβ−milog(1+exp(−x′iβ))]+constant We can compare the fit of a logitstic regression model known as saturated model. The MLE of πi under the logistic regression model is ˆπi=exp(x′iˆβ)1+exp(x′iˆβ), and the MLE of πi under saturated model is yi/mi. Then the likelihood ratio statistic for testing the logistic regression model as the reduced model VS. the saturated model as the full model is 2n∑i=1[yilog(yi/miˆπi)+(mi−yi)log(1−yi/mi1−ˆπi)] which is called the Deviance Statistics, the Residual Deviance or just the Deviance.
A Lack-of-fit Test: when n is large, and/or m1,…mn, are each suitablely large, the Deviance Statistic is approximately χ2n−p if the logistic regression model is correct.
Deviance Residual: di≡sign(yi/mi−ˆπi)√2[yilog(yimiˆπi)+(mi−yi)log(mi−yimi−miˆπi)] The residual deviance statistic is the sum of the squared deviance residuals (∑ni=1d2i).
Pearson’s Chi-Square Statistic: Another lack of fit statistic that is approximately χ2n−p under the null is Pearson’s Chi-Square Statistic: X2=n∑i=1(yi−ˆE(yi)√^Var(yi))2=n∑i=1(yi−miˆπi√miˆπi(1−ˆπi))2. The term ri=yi−miˆπi√miˆπi(1−ˆπi) is known as Pearson residual.
Residual Diagnostics: For large mi values, both di and ri should be approximately distributed as standard normal random variables if the logistic regression model is correct.
=g1m(cbind(tumor, total-tumor)~dose,
ofamily=binomial(link=logit), data=d)
summary(o)
Overdispersion: in the GLM framework, its often the case that Var(yi) is the function of E(yi). That is the case for logistic regression where Var(yi)=miπ(1−πi)=miπi−(miπi)2/mi=E(yi)−[E(yi)]2/mi. If the variability of our response is greater than we should expect based on our estimates of the mean, we say that there is overdispersion.
Quasi-likelihood Inference: in the binomial case, we make all the same assumptions as before except that we assume Var(yi)=ϕmiπi(1−πi) for some unknown dispersion parameter ϕ>1. The dispersion parameter can be estimated by ˆϕ=∑ni=1d2i/(n−p) or ˆϕ=∑ni=1r2i/(n−p).
- The estimated variance of ˆβ is multiplied by ˆϕ.
- For Wald type inferences, the standard normal null distribution is replaced by t with n−p degrees of freedom.
- Any test statistic T that was assumed χ2q under H0 is replaced with T/(qˆϕ) and compared to an F distribution with q and n−p degrees of freedom.
=g1m(cbind(tumor, total-tumor)~dosef,
oqfamily=quasibinomial(link=logit),data=d)
summary(oq)