ad2up.test: Quadratic Class Upper Tail Anderson-Darling test
Description
Quadratic Class Upper Tail Anderson-Darling test providing a comparison of a
fitted distribution with the empirical distribution.
Usage
ad2up.test(x, distn, fit, H = NA, sim = 100, tol = 1e-04, estfun = NA)
Arguments
x
a numeric vector of data values
distn
character string naming the null distribution
fit
list of null distribution parameters
H
a treshold value
sim
maximum number of szenarios in the Monte-Carlo simulation
tol
if the difference of two subsequent p-value calculations is lower than tol the
Monte-Carlo simulation is discontinued
estfun
an function as character string or NA (default). See mctest.
Value
A list with class "mchtest" containing the following components
statistic
the value of the Quadratic Class Upper Tail Anderson-Darling statistic
treshold
the treshold value
p.value
the p-value of the test
data.name
a character string giving the name of the data
method
the character string "Quadratic Class Upper Tail Anderson-Darling Test"
sim.no
number of simulated szenarios in the Monte-Carlo simulation
Details
The Anderson-Darling test compares the null distribution with the empirical distribution
function of the observed data, where left truncated data samples are allowed.
The test statistic is given by
$$AD_{up}^2 = -2n \log(1-z_H) + 2\sum_{j=1}^n\log(1-z_j) +
\frac{1-z_H}{n}\sum_{j=1}^n(1+2(n-j))\frac{1}{1-z_j}$$
with $z_H = F_theta(H)$ and $
z_j=F_theta(x_j)$, where $x_1, \dots, x_n$ are the ordered data values. Here,
$F_theta$ is the null distribution.
References
Chernobay, A., Rachev, S., Fabozzi, F. (2005), Composites goodness-of-fit tests
for left-truncated loss samples, Tech. rep., University of Calivornia Santa Barbara