1

I am using R and i need to do an Anderson-Darling test on my data. I am using the adk package ( http://cran.r-project.org/web/packages/adk/adk.pdf ). How do I calculate the critical value for a given significance level? Let's say I want a significance of 0.01, what should I do? In the package, there is a method called adk.pval which has to be used and the following is taken from the help:


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.


I have to use this package, so help is appreciated, thank you!

user37412
  • 5
  • 4
endamaco
  • 11
  • 1
  • You said ... "I have to use this package" - is this coursework? – Glen_b Feb 04 '13 at 22:36
  • 1
    Your question appears to be almost purely an R question ('how do I use this package to achieve this particular quantity?'). As such it may belong on stackoverflow. – Glen_b Feb 04 '13 at 22:39
  • @Glen I agree with you, but it seems to me that any good answer would have to involve some explanation of statistical concepts: I suspect the problem may be more conceptual than technical. – whuber Feb 05 '13 at 12:50
  • I voted to close this as a duplicate under the assumption that the question concerns the relationship between a sampling statistic and its p-value. – whuber Jan 16 '14 at 19:05

0 Answers0