Shicheng-Guo / rbiotools

Other
0 stars 0 forks source link

null (reduced) model and likelihood ratio test statistic #15

Open Shicheng-Guo opened 3 years ago

Shicheng-Guo commented 3 years ago

The null (reduced) model in this case has no predictors, so the fitted probabilities are simply the sample proportion of successes, 9/27=0.333333. The log-likelihood for the null model is ℓ(β^(0))=−17.1859, so the deviance for the null model is −2×−17.1859=34.372, which is shown in the "Total" row in the Deviance Table. The log-likelihood for the fitted (full) model is ℓ(β^)=−13.0365, so the deviance for the fitted model is −2×−13.0365=26.073, which is shown in the "Error" row in the Deviance Table. The likelihood ratio test statistic is therefore Λ∗=−2(−17.1859−(−13.0365))=8.299, which is the same as G2=34.372−26.073=8.299. The p-value comes from a χ2 distribution with 2−1=1 degrees of freedom.

https://online.stat.psu.edu/stat462/node/207/