stat_de {CPAT}  R Documentation 
Compute the DarlingErdös Statistic
Description
This function computes the DarlingErdös statistic.
Usage
stat_de(dat, a = log, b = log, estimate = FALSE,
use_kernel_var = FALSE, custom_var = NULL, kernel = "ba",
bandwidth = "and", get_all_vals = FALSE)
Arguments
dat 
The data vector 
a 
The function that will be composed with

b 
The function that will be composed with

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 
Details
If \bar{A}_T(\tau, t_T)
is the weighted and trimmed CUSUM statistic
with weighting parameter \tau
and trimming parameter t_T
(see
stat_Vn
), then the DarlingErdös statistic is
l(a_T) \bar{A}_T(1/2, 1)  u(b_T)
with l(x) = \sqrt{2 \log x}
and u(x) = 2 \log x + \frac{1}{2} \log
\log x  \frac{1}{2} \log \pi
(\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.
Value
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)
References
Rice G, Miller C, Horváth L (????). “A new class of change point test of Rényi type.” inpress.
Examples
CPAT:::stat_de(rnorm(1000))
CPAT:::stat_de(rnorm(1000), use_kernel_var = TRUE, bandwidth = "nw", kernel = "bo")