HR.test {CPAT} | R Documentation |
Rényi-Type Test
Description
Performs the (univariate) Rényi-type test for change in mean, as described in
(Rice et al. ). This is effectively an interface to
stat_Zn
; see its documentation for more details. p-values are
computed using pZn
, which represents the limiting distribution
of the test statistic under the null hypothesis, which represents the
limiting distribution of the test statistic under the null hypothesis when
kn
represents a sequence t_T
satisfying t_T \to \infty
and t_T/T \to 0
as T \to \infty
. (log
and
sqrt
should be good choices.)
Usage
HR.test(x, kn = log, use_kernel_var = FALSE, stat_plot = FALSE,
kernel = "ba", bandwidth = "and")
Arguments
x |
Data to test for change in mean |
kn |
A function corresponding to the trimming parameter |
use_kernel_var |
Set to |
stat_plot |
Whether to create a plot of the values of the statistic at all potential change points |
kernel |
If character, the identifier of the kernel function as used in
cointReg (see |
bandwidth |
If character, the identifier for how to compute the
bandwidth as defined in cointReg (see
|
Value
A htest
-class object containing the results of the test
References
Rice G, Miller C, Horváth L (????). “A new class of change point test of Rényi type.” in-press.
Examples
HR.test(rnorm(1000))
HR.test(rnorm(1000), use_kernel_var = TRUE, kernel = "bo", bandwidth = "nw")