ADTestStat {Dowd} | R Documentation |
Plots cumulative density for AD test and computes confidence interval for AD test stat.
Description
Anderson-Darling(AD) test can be used to carry out distribution equality test and is similar to Kolmogorov-Smirnov test. AD test statistic is defined as:
A^2=n\int_{-\infty}^{\infty}\frac{[\hat{F}(x)-F(x)]^2}{F(x)[1-F(x)]}dF(x)
which is equivalent to
=-n-\frac{1}{n}\sum_{i=1}^n(2i-1)[\ln F(X_i)+\ln(1-F(X_{n+1-i}))]
Usage
ADTestStat(number.trials, sample.size, confidence.interval)
Arguments
number.trials |
Number of trials |
sample.size |
Sample size |
confidence.interval |
Confidence Interval |
Value
Confidence Interval for AD test statistic
Author(s)
Dinesh Acharya
References
Dowd, K. Measuring Market Risk, Wiley, 2007.
Anderson, T.W. and Darling, D.A. Asymptotic Theory of Certain Goodness of Fit Criteria Based on Stochastic Processes, The Annals of Mathematical Statistics, 23(2), 1952, p. 193-212.
Kvam, P.H. and Vidakovic, B. Nonparametric Statistics with Applications to Science and Engineering, Wiley, 2007.
Examples
# Probability that the VaR model is correct for 3 failures, 100 number
# observations and 95% confidence level
ADTestStat(1000, 100, 0.95)