Products & Services Solutions Academia Support User Community Company

Learn more about Econometrics Toolbox   

lratiotest - Likelihood ratio test

Syntax

[h,pValue,stat,cValue] = lratiotest(uLL,rLL,dof)
[h,pValue,stat,cValue] = lratiotest(uLL,rLL,dof,alpha)

Description

[h,pValue,stat,cValue] = lratiotest(uLL,rLL,dof) performs the likelihood ratio test at a default 5% significance level.

[h,pValue,stat,cValue] = lratiotest(uLL,rLL,dof,alpha) performs the likelihood ratio test at significance level alpha.

The likelihood ratio test compares specifications of nested models by assessing the significance of restrictions to an extended model with unrestricted parameters. Loglikelihoods maximized with respect to restricted and unrestricted model parameters (rLL and uLL, respectively) are used to compute the test statistic

stat = 2*(uLLrLL).

When the test statistic exceeds a critical value in its asymptotic distribution, lratiotest rejects the null, restricted model in favor of the alternative, unrestricted model. The asymptotic distribution is chi-square, with degree-of-freedom parameter (dof) equal to the number of restrictions. The nominal significance level of the test (alpha) determines the critical value.

Input Arguments

uLL

Loglikelihoods optimized with respect to parameters for the unrestricted models to be tested. If uLL is a scalar, lratiotest expands it to the same length as rLL. If uLL and rLL are both vectors, they must be the same length. If uLL is a row vector, output arguments are also row vectors.

rLL

Loglikelihoods optimized with respect to parameters for the restricted models to be tested. If rLL is a scalar, lratiotest expands it to the same length as uLL. If rLL and uLL are both vectors, they must be the same length. Elements of rLL should not be greater than corresponding elements of uLL. If rLL is a row vector, output arguments are also row vectors.

dof

Degree-of-freedom parameters for the asymptotic chi-square distributions of the test statistics. Elements of dof are positive integers equal to the number of restrictions in the corresponding model comparison, and should be less than the number of parameters in the unrestricted model. If dof is a scalar, lratiotest expands it to a vector with length equal to the number of tests. If dof is a vector, it must have length equal to the number of tests.

Optional Input Arguments

alpha

Nominal significance levels for the tests. Elements of alpha must be greater than zero and less than one. If alpha is a scalar, lratiotest expands it to a vector with length equal to the number of tests. If alpha is a vector, it must have length equal to the number of tests. The default value of alpha is 0.05.

Output Arguments

h

Vector of Booleans, representing decisions for the tests. The length of h is the number of tests. A 1 indicates rejection of the null (restricted) model for the corresponding test. A 0 represents failure to reject the restricted model.

pValue

Vector of probability values of the test statistics. The length of pValue is the number of tests.

stat

Vector of test statistics. The length of stat is the number of tests.

cValue

Vector of critical values for the tests. The length of cValue is the number of tests.

Notes

Examples

This example fits a Gamma distribution to simulated education and income data. The example is explained in more detail in Example: Specifying Distribution Parameters. Load the data:

load IncomeData
x = education;
y = income;

The unrestricted model has loglikelihood:

Here

The restricted model is ρ = 1. In other words, the restricted model has an exponential distribution.

The unrestricted maximum likelihood estimates of β and ρ, and the unrestricted maximum loglikelihood are:

ubeta = -4.7179
urho = 3.1507
uLL = -82.9160

The corresponding restricted estimates are:

rbeta = 15.6027
rrho = 1
rLL = -88.4363

Test the unrestricted model against the restricted model:

dof = 1;
[LRh,LRp,LRstat,cV] = lratiotest(uLL,rLL,dof)

LRh =
     1

LRp =
  8.9146e-004

LRstat =
   11.0404

cV =
    3.8415

LRh = 1 means lratiotest rejects the restricted hypothesis.

For additional examples, see Example: Comparing GARCH Models and Setting Model Parameters.

References

[1] Davidson, R. and J. G. MacKinnon. Econometric Theory and Methods. Oxford, UK: Oxford University Press, 2004.

[2] Godfrey, L. G. Misspecification Tests in Econometrics. Cambridge, UK: Cambridge University Press, 1997.

[3] Greene, W. H. Econometric Analysis. 6th ed. Upper Saddle River, NJ: Pearson Prentice Hall, 2008.

[4] Hamilton, J. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.

See Also

garchfit, garchinfer, lmtest, vgxvarx, waldtest

Misspecification Tests

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS