Learn R Programming

uGMAR (version 3.2.6)

LR_test: Perform likelihood ratio test

Description

LR_test performs a likelihood ratio test for a GMAR, StMAR, or G-StMAR model.

Usage

LR_test(gsmar1, gsmar2)

# S3 method for lr print(x, ..., digits = 4)

Arguments

gsmar1

an object of class 'gsmar' generated by fitGSMAR or GSMAR, containing the freely estimated model.

gsmar2

an object of class 'gsmar' generated by fitGSMAR or GSMAR, containing the constrained model.

x

object of class 'lr' generated by the function LR_test.

...

currently not in use.

digits

how many significant digits to print?

Value

Returns an object of class \('lr'\) containing the test statistic and the related p-value.

Methods (by generic)

  • print: print method

Details

Performs a likelihood ratio test, testing the null hypothesis that the true parameter value lies in the constrained parameter space. Under the null, the test statistic is asymptotically \(\chi^2\)-distributed with \(k\) degrees of freedom, \(k\) being the difference in the dimensions of the unconstrained and constrained parameter spaces.

Note that this function does not verify that the two models are actually nested.

References

  • Kalliovirta L., Meitz M. and Saikkonen P. 2015. Gaussian Mixture Autoregressive model for univariate time series. Journal of Time Series Analysis, 36, 247-266.

  • Meitz M., Preve D., Saikkonen P. 2018. A mixture autoregressive model based on Student's t-distribution. arXiv:1805.04010 [econ.EM].

  • Virolainen S. 2020. A mixture autoregressive model based on Gaussian and Student's t-distribution. arXiv:2003.05221 [econ.EM].

See Also

Wald_test, fitGSMAR, GSMAR, diagnosticPlot, profile_logliks, quantileResidualTests, condmomentPlot

Examples

Run this code
# NOT RUN {
# GMAR p=1, M=2 model:
fit12 <- fitGSMAR(simudata, p=1, M=2, model="GMAR", ncalls=1, seeds=1)

# GMAR p=1, M=2 model AR parameters restricted to be the same in both
# regimes:
fit12r <- fitGSMAR(simudata, p=1, M=2, model="GMAR", restricted=TRUE,
 ncalls=1, seeds=1)

# Test with likelihood ratio test whether the AR parameter are the same in
# both regimes:
LR_test(fit12, fit12r)
# }

Run the code above in your browser using DataLab