Compute the Rényi-Type Statistic
This function computes the Rényi-type statistic.
stat_Zn(dat, kn = function(n) { floor(sqrt(n)) }, estimate = FALSE, use_kernel_var = FALSE, custom_var = NULL, kernel = "ba", bandwidth = "and", get_all_vals = FALSE)
dat |
The data vector |
kn |
A function corresponding to the trimming parameter t_T; by default, the square root function |
estimate |
Set to |
use_kernel_var |
Set to |
custom_var |
Can be a vector the same length as |
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
|
get_all_vals |
If |
The definition of the statistic is
\max_{t_T ≤q t ≤q T - t_T} \hat{σ}_{t,T}^{-1} ≤ft|t^{-1}∑_{s = 1}^{t}X_s - (T - t)^{-1}∑_{s = t + 1}^{T} X_s \right|
The parameter kn
corresponds to the trimming parameter t_T.
If both estimate
and get_all_vals
are FALSE
, the
value of the test statistic; otherwise, a list that contains the test
statistic and the other values requested (if both are TRUE
,
the test statistic is in the first position and the estimated change
point in the second)
CPAT:::stat_Zn(rnorm(1000)) CPAT:::stat_Zn(rnorm(1000), kn = function(n) {floor(log(n))}) CPAT:::stat_Zn(rnorm(1000), use_kernel_var = TRUE, bandwidth = "nw", kernel = "bo")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.