Compute the Darling-Erdös Statistic
This function computes the Darling-Erdös statistic.
stat_de(dat, a = log, b = log, estimate = FALSE, use_kernel_var = FALSE, custom_var = NULL, kernel = "ba", bandwidth = "and", get_all_vals = FALSE)
dat |
The data vector |
a |
The function that will be composed with l(x) = (2 \log x)^{1/2} |
b |
The function that will be composed with u(x) = 2 \log x + \frac{1}{2} \log \log x - \frac{1}{2} \log π |
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 |
If \bar{A}_T(τ, t_T) is the weighted and trimmed CUSUM statistic
with weighting parameter τ and trimming parameter t_T (see
stat_Vn
), then the Darling-Erdös statistic is
l(a_T) \bar{A}_T(1/2, 1) - u(b_T)
with l(x) = √{2 \log x} and u(x) = 2 \log x + \frac{1}{2} \log
\log x - \frac{1}{2} \log π (\log x is the natural logarithm of
x). The parameter a
corresponds to a_T and b
to
b_T; these are both log
by default.
See (Rice et al. ) to learn more.
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 changg
point in the second)
Rice G, Miller C, Horváth L (????). “A new class of change point test of Rényi type.” in-press.
CPAT:::stat_de(rnorm(1000)) CPAT:::stat_de(rnorm(1000), use_kernel_var = TRUE, bandwidth = "nw", kernel = "bo")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.