calc_mcstat: Calculate combined p-value test statistic

Description Usage Arguments Value References

View source: R/RcppExports.R

Description

This function computes test-statistics for observed and simulated samples. It begins by calculating it for the obsted data, then generates test-statistics from simulated data to approximate null distribution and then calculates the p-values and combines them according to eq. 17 or 18 of Dufour & Luger (2017).

Usage

1
calc_mcstat(ezt, N, params)

Arguments

ezt

observed series

N

total number of test statistics (i.e. simulated + observed = N)

param

output from approxDist which obtains the parameters needed in eq. 16 which is used for combining p-values.

Value

The four test statistics (eq. 11 - 14 in paper)

References

Dufour, J. M., & Luger, R. (2017). Identification-robust moment-based tests for Markov switching in autoregressive models. Econometric Reviews, 36(6-9), 713-727.


roga11/MSTest_v1 documentation built on Dec. 22, 2021, 5:16 p.m.