LikelihoodRatioTest

LikelihoodRatioTest(model0NbParameters, model0LogLikelihood, model1NbParameters, model1LogLikelihood, level=0.05)

Nested likelihood model selection.

This test helps selecting between two nested models \mathcal{M}_0 \subset \mathcal{M}_1 estimated by likelihood maximization.

Suppose that \mathcal{M}_1 is a model with d-dimensional parameter \vect{\theta} = (\vect{\theta}^{(1)}, \vect{\theta}^{(2)}) where \vect{\theta}^{(1)} is a k-dimensional subset of \vect{\theta}. We suppose that \mathcal{M}_0 is obtained by constraining \vect{\theta}^{(1)} to be equal to a fixed value denoted by \vect{\theta}^{(1)}_0. Then \mathcal{M}_0 is a model with parameter \vect{\theta}^{(2)}.

Let \hat{\vect{\theta}} denote the maximum likelihood estimator of \vect{\theta} for model \mathcal{M}_1 and \ell(\hat{\vect{\theta}}) its maximized log-likelihood.

The profile log-likelihood for \vect{\theta}^{(1)} is defined as:

l_p(\vect{\theta}^{(1)}) = \max_{\vect{\theta}^{(2)}} \ell(\vect{\theta}^{(1)}, \vect{\theta}^{(2)})

We define the profile deviance statistic depending on \vect{\theta}^{(1)} as the maximized log-likelihood with respect to \vect{\theta}^{(2)} when \vect{\theta}^{(1)} is frozen:

\mathcal{D}_p (\theta^{(1)}) = 2(\ell(\hat{\vect{\theta}}) - l_p(\vect{\theta}^{(1)}))

Under suitable regularity conditions, for large n, \mathcal{D}_p (\theta^{(1)}) follows a \chi^2_k distribution.

We use the profile deviance statistic to define the (1-\alpha) confidence region for the true value of parameter \vect{\theta}^{(1)}:

\mathcal{C}_{\alpha} = \left\{\vect{\theta}^{(1)} : \mathcal{D}_p (\theta^{(1)}) \leq c_{\alpha} \right\}

where c_{\alpha} is the (1-\alpha) quantile of the \chi^2_k distribution. The level \alpha is the Type 1 error of the test, which means the mistaken rejection of model \mathcal{M}_0.

In order to test the validity of model \mathcal{M}_0 with parameter (\vect{\theta}^{(1)}_0, \vect{\theta}^{(2)}) relative to \mathcal{M}_1 with parameter (\vect{\theta}^{(1)}, \vect{\theta}^{(2)}) at the \alpha-level of significance, we check the value \mathcal{D}_p (\theta^{(1)}_0):

  • if \mathcal{D}_p (\theta^{(1)}_0) \leq c_{\alpha}, we accept \mathcal{M}_0 rather than \mathcal{M}_1,

  • if \mathcal{D}_p (\theta^{(1)}_0) \geq c_{\alpha}, we reject \mathcal{M}_0 in favor of \mathcal{M}_1.

Parameters:
model0NbParametersint, \geq 1,

Number of parameters of \mathcal{M}_0

m0llhfloat

\mathcal{M}_0 log-likelihood

model1NbParametersint, \geq 1,

Number of parameters of \mathcal{M}_1

m1llhfloat

\mathcal{M}_1 log-likelihood

levelfloat, 0 \leq \alpha \leq 1, optional

Risk of wrongly rejecting \mathcal{M}_0

Default value is 0.05

Returns:
test_resultTestResult

Test result.

Notes

Both models must have been estimated on the same data.