Learn R Programming

gmvarkit (version 1.5.0)

Wald_test: Perform Wald test for a GMVAR or SGMVAR model

Description

Wald_test performs a Wald test for a GMVAR or SGMVAR model

Usage

Wald_test(gmvar, A, c, h = 6e-06)

Arguments

gmvar

an object of class 'gmvar' created with fitGMVAR or GMVAR.

A

a size \((k x n_params)\) matrix with full row rank specifying part of the null hypothesis where \(n_params\) is the number of parameters in the (unconstrained) model. See details for more information.

c

a length \(k\) vector specifying part of the null hypothesis. See details for more information.

h

difference used to approximate the derivatives.

Value

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

statistic

the value of the Wald statistics.

parameter

the degrees of freedom of the Wald 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 (Wald test).

data.name

a character string giving the names of the supplied model, constraint matrix A, and vector c.

gmvar

the supplied argument gmvar.

A

the supplied argument A.

c

the supplied argument c.

h

the supplied argument h.

Details

Denoting the true parameter value by \(\theta_{0}\), we test the null hypothesis \(A\theta_{0}=c\). Under the null, the test statistic is asymptotically \(\chi^2\)-distributed with \(k\) (=nrow(A)) degrees of freedom. The parameter \(\theta_{0}\) is assumed to have the same form as in the model supplied in the argument gmvar and it is presented in the documentation of the argument params in the function GMVAR (see ?GMVAR).

Finally, note that this function does not check whether the specified constraints are feasible (e.g. whether the implied constrained model would be stationary or have positive definite error term covariance matrices).

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.

@keywords internal

See Also

LR_test, fitGMVAR, GMVAR, diagnostic_plot, profile_logliks, quantile_residual_tests, cond_moment_plot

Examples

Run this code
# NOT RUN {
 # Structural GMVAR(2, 2), d=2 model with recursive identification
 W22 <- matrix(c(1, NA, 0, 1), nrow=2, byrow=FALSE)
 fit22s <- fitGMVAR(gdpdef, p=2, M=2, structural_pars=list(W=W22),
                    ncalls=1, seeds=2)
 fit22s

 # Test whether the lambda parameters (of the second regime) are identical
 # (due to the zero constraint, the model is identified under the null):
 # fit22s has parameter vector of length 26 with the lambda parameters
 # in elements 24 and 25.
 A <- matrix(c(rep(0, times=23), 1, -1, 0), nrow=1, ncol=26)
 c <- 0
 Wald_test(fit22s, A=A, c=c)

 # Test whether the off-diagonal elements of the first regime's first
 # AR coefficient matrix (A_11) are both zero:
 # fit22s has parameter vector of length 26 and the off-diagonal elements
 # of the 1st regime's 1st AR coefficient matrix are in the elements 6 and 7.
 A <- rbind(c(rep(0, times=5), 1, rep(0, times=20)),
            c(rep(0, times=6), 1, rep(0, times=19)))
 c <- c(0, 0)
 Wald_test(fit22s, A=A, c=c)
# }

Run the code above in your browser using DataLab