The likelihood-ratio test is an alternative to $\chi^2$ test in order to assess the **goodness of fit**. It is straight-forward and easy to use.

  1. Calculate $G = -2ln\bigg[\frac{likeli \, hood \, of \, the \, replacing \, model \, h_\theta^{(1)}}{likelihood \, of \, the \, existing \, model \, h_\theta^{(0)}}\bigg] = 2[loglikelihood \, of \, h_\theta^{(0)} – loglikelihood \, of \, h_\theta^{(1)}]$.

– Notice that $ln$ is removed by performing logarithm.

– The log-likelihood is usually outputted by R-language.

  1. Because the distribution model of likelihood ratio test is nearly the same as $\chi^2$, it allows us to assign $G$-score to $\chi^2$-score.

– Mathematically we have $G$-score = $\chi^2$-score

  1. Find $p$ value based on $\chi^2$ statistic obtained.

  2. Determine if $h_\theta^{(1)}$ is more statistically significant than $h_\theta^{(0)}$ based on obtained $p$ value and the statistical significance level $\alpha$ (usually $\alpha = 0.05$)

Example:

Suppose we try to fit a given dataset with two alternative models $h_\theta^{(1)}$ and $h_\theta^{(0)}$ where in $h_\theta^{(1)}$ we eliminated some predictors we reckon that they are not sensitive enough. Now we try to assess if the model $h_\theta^{(1)}$ is more statistically significant than the original model by using the likelihood ratio test.

Suppose $df = 1$.

  1. Log-likelihood of

– $h_\theta^{(1)}$ is 53.6

– $h_\theta^{(0)}$ is 68.3

Therefore, we have $G = 2[68.3 – 53.6] = 29.31$

  1. $\chi^2 = G = 29.31$

  2. Find $p = P[\chi^2(df = 1) = 29.31]$ by using R

pchisq(29.31, 1, lower.tail = FALSE)
[1] 6.167658e-08
  1. Because $p$-value « $\alpha = 0.05$, we can reject the null hypothesis $H_0$ that two models are not significant different, and accept the alternative hypothesis $H_a$ that $h_\theta^{(1)}$ fits better than $h_\theta^{(0)}$.