Wald_test {uGMAR}R Documentation

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)

Arguments

gsmar

a class 'gsmar' object, typically generated by fitGSMAR or GSMAR.

A

a size (k x n_params) matrix with full row rank specifying a 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 a part of the null hypothesis. See details for more information.

h

the difference used to approximate the derivatives.

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

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

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.

gsmar

the supplied argument gsmar.

A

the supplied argument A.

c

the supplied argument c.

h

the supplied argument h.

References

See Also

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

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


[Package uGMAR version 3.4.5 Index]