CHPTest {MSTest}R Documentation

Carrasco, Hu, and Ploberger (2014) parameter stability test

Description

This function performs the CHP (2014) parameter stability test as outline in Carrasco, M., Hu, L. and Ploberger, W. (2014). Original source code can be found here.

Usage

CHPTest(Y, p, control = list())

Arguments

Y

A (T x 1) matrix of observations.

p

Integer determining the number of autoregressive lags.

control

List with test procedure options including:

  • N: Integer determining the number of Bootstrap iterations. Default is set to 3000 as in paper.

  • rho_b: Number determining bounds for distribution of rh0 (i.e. rho ~ [-rho_b,rho_b]).

  • msvar: Boolean indicator. If TRUE, there is a switch in variance. If FALSE only switch in mean is considered.

  • getSE: Boolean indicator. If TRUE, standard errors for restricted model are estimated. If FALSE no standard errors are estimated. Default is TRUE.

Value

List of class CHPTest (S3 object) with model attributes including:

References

Carrasco, Marine, Liang Hu, and Werner Ploberger. 2014. “Optimal test for Markov switching parameters.” Econometrica 82 (2): 765–784.

Examples

# load data used in Hamilton 1989 
y84 <- as.matrix(hamilton84GNP$GNP_logdiff)


# Set test procedure options
control = list(N = 1000, 
               rho_b = 0.7, 
               msvar = FALSE)

# perform test with switch in mean only on Hamilton 1989 data

  mdl_84_msmu <- CHPTest(y84, p = 4, control = control)
  summary(mdl_84_msmu)


[Package MSTest version 0.1.2 Index]