Learn R Programming

uGMAR (version 3.2.6)

Wald_test: Perform Wald test

Description

Wald_test performs a Wald test for a GMAR, StMAR, or G-StMAR model.

Usage

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

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

Arguments

gsmar

object of class 'gsmar' created with the function fitGSMAR or GSMAR.

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

the difference used to approximate the derivatives.

x

object of class 'wald' generated by the function Wald_test.

...

other arguments passed to fn.

digits

how many significant digits to print?

Value

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

Methods (by generic)

  • print: print method

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 gsmar and it is presented in the documentation of the argument params in the function GSMAR (see ?GSMAR).

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. 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

LR_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)

# Test with Wald test whether the AR coefficients are the same in both
# regimes:
# There are 7 parameters in the model and the AR coefficient of the
# first regime is the 2nd element, whereas the AR coefficient of the second
# regime is in the 5th element.
A <- matrix(c(0, 1, 0, 0, -1, 0, 0), nrow=1, ncol=7)
c <- 0
Wald_test(fit12, A=A, c=c)
# }

Run the code above in your browser using DataLab