LR_test: Perform likelihood ratio test

View source: R/WaldAndLR.R

LR_testR Documentation

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)

Arguments

gsmar1

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

gsmar2

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

Details

Performs a likelihood ratio test, testing the null hypothesis that the true parameter value lies in the constrained parameter space specified by constraints imposed to the model gsmar2. 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. Notably, GSMAR models with different autoregressive orders are not nested, whereas testing models with different numbers of regimes induce an identification problem and thereby unreliable test results (see the discussion related to Theorem 2 in Virolainen, 2021).

Value

A list with class "htest" containing the following components:

statistic

the value of the likelihood ratio statistics.

parameter

the degrees of freedom of the likelihood ratio statistic.

p.value

the p-value of the test.

alternative

a character string describing the alternative hypothesis.

method

a character string indicating the type of the test (likelihood ratio test).

data.name

a character string giving the names of the supplied models, gsmar1 and gsmar2.

gsmar1

the supplied argument gsmar1

gsmar2

the supplied argument gsmar2

References

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

  • Meitz M., Preve D., Saikkonen P. 2023. A mixture autoregressive model based on Student's t-distribution. Communications in Statistics - Theory and Methods, 52(2), 499-515.

  • Virolainen S. 2022. A mixture autoregressive model based on Gaussian and Student's t-distributions. Studies in Nonlinear Dynamics & Econometrics, 26(4) 559-580.

See Also

Wald_test, fitGSMAR, GSMAR, diagnostic_plot, profile_logliks, quantile_residual_tests, cond_moment_plot

Examples


# 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 with 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 parameters are the same in
# both regimes:
LR_test(fit12, fit12r)


uGMAR documentation built on Aug. 19, 2023, 5:10 p.m.