Learn R Programming

gmvarkit (version 1.2.0)

LR_test: Perform likelihood ratio test for a GMVAR or SGMVAR model

Description

LR_test performs a likelihood ratio test for a GMVAR or SGMVAR model

Usage

LR_test(gmvar1, gmvar2)

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

Arguments

gmvar1

an object of class 'gmvar' generated by fitGMVAR or GMVAR, containing the freely estimated model.

gmvar2

an object of class 'gmvar' generated by fitGMVAR or GMVAR, containing the constrained model.

x

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

...

currently not used.

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. 2016. Gaussian mixture vector autoregression. Journal of Econometrics, 192, 485-498.

  • Virolainen S. 2020. Structural Gaussian mixture vector autoregressive model. Unpublished working paper, available as arXiv:2007.04713.

See Also

Wald_test, fitGMVAR, GMVAR, diagnostic_plot, profile_logliks, quantile_residual_tests

Examples

Run this code
# NOT RUN {
 # Load the data
 data(eurusd, package="gmvarkit")
 data <- cbind(10*eurusd[,1], 100*eurusd[,2])
 colnames(data) <- colnames(eurusd)

 # Structural GMVAR(2, 2), d=2 model identified with sign-constraints:
 W_222 <- matrix(c(1, NA, -1, 1), nrow=2, byrow=FALSE)
 fit222s <- fitGMVAR(data, p=2, M=2, structural_pars=list(W=W_222),
                     ncalls=1, seeds=1)

 # The same model but the AR coefficients restricted to be the same
 # in both regimes:
 C_mat <- rbind(diag(2*2^2), diag(2*2^2))
 fit222sc <- fitGMVAR(data, p=2, M=2, constraints=C_mat,
                      structural_pars=list(W=W_222),
                      ncalls=1, seeds=1)

 # Test whether the constraints are supported by the data:
 LR_test(fit222s, fit222sc)
 
# }

Run the code above in your browser using DataLab