adk.pval {adk}R Documentation

Function for computing p-values of Anderson-Darling test statistics

Description

This function "adk.pval" evaluates the p-value of the observed value tx of T_m, the standardized Anderson-Darling statistic. It is used by adk.test and adk.combined.test.

Usage

adk.pval(tx,m)

Arguments

tx

threshold for which the right tail probability of the standardized Anderson-Darling statistics T_m is to be calculated

m

index of the standardized T_m statistic (see reference)

Details

This function first interpolates the upper T_m quantiles as given in Table 1 (see reference below) to the given value of m by fitting a quadratic in 1/sqrt(m) to the quantiles as tabulated for the upper quantile levels .25, .10, .05, .025, .01.

Next a quadratic in the interpolated quantiles (for m) is fitted to the log-odds of the upper probability levels defining these quantiles and the fitted log-odds value at tx is converted back to the calculated upper probability value, i.e., the p-value. p-values outside the tabulated range [.01,.25] are obtained by linear extrapolation of the fitted quadratic.

Value

A list with components

p0

p-value of tx, i.e., p0=P(T_m>= tx)

extrap

a logical indicator, extrap = TRUE indicates that linear extrapolation took place, otherwise quadratic interpolations was used.

Author(s)

Fritz Scholz

References

Scholz, F. W. and Stephens, M. A. (1987), K-sample Anderson-Darling Tests, Journal of the American Statistical Association, Vol 82, No. 399, 918–924.

See Also

adk.test and adk.combined.test

Examples

## compute p-value when tx = 3 and m = 6
adk.pval(3,6)

[Package adk version 1.0-2 Index]