Native implementation for the two composite null hypotheses that have
published percentage points: the normal distribution with unknown mean
and variance, and the exponential distribution with unknown mean. The
statistic is
$$A^2 = -n - n^{-1}\sum (2i-1)[\ln F(z_i) + \ln(1 - F(z_{n+1-i}))]$$
and is then modified for the estimated parameters before being compared
with the tabulated points (see .gof_lillie_crit for the table
provenance).
Usage
anderson_darling(x, dist = c("norm", "expon"))Value
A morie_test_result (subclass of morie_rich_result)
with the modified statistic \(A^*\) as test_statistic, the
p-value, and sample size n. extra carries the unmodified
a_squared and, when the statistic falls outside the tabulated
range, p_bounded set to "upper" or "lower" –
the p-value is then the nearest tabulated bound, not an exact value.
Details
Because the fitted parameters are estimated from the same sample, the unmodified \(A^2\) is not referred to its own null distribution; \(A^* = A^2(1 + 0.75/n + 2.25/n^2)\) in the normal case and \(A^* = A^2(1 + 0.3/n)\) in the exponential case.
