I am fitting my experimental data with different distributions, I am computing Anderson Darling statistic for my data and theoretical distributions. I want to compute P value from Anderson Darling statistic without using the tables, How can I compute P value?
Asked
Active
Viewed 1,449 times
2
-
See [Distribution specificity of the Anderson-Darling test](http://stats.stackexchange.com/q/243643/17230) & [sample size of Anderson-Darling test](http://stats.stackexchange.com/q/135266/17230). – Scortchi - Reinstate Monica Feb 24 '17 at 11:09
1 Answers
1
If you don't want to interpolate from pre-computed tables, you may want to do bootstrap-based simulation. Try adSim (https://cran.r-project.org/package=qualityTools)
Let's use normal distribution in our example. You'll need to change the string to something else if you don't like to test for normality.
Interpolation
adSim(x, "normal", NA)
$distribution
[1] "normal"
$parameter_estimation
mean sd
32.450662 1.717755
$Anderson_Darling
[1] 0.5028619
$p_value
[1] 0.1865325
The table critical values are 75%, 90%, 95%, 97.5% and 99% percentile (available in the source code https://github.com/cran/qualityTools/blob/master/R/adSim.R).
Boostrap simulation
adSim(x, "normal", 10000)
... simulating the Anderson-Darling distribution by 10000 bootstraps for normal distribution...
$distribution
[1] "normal"
$parameter_estimation
mean sd
32.450662 1.717755
$Anderson_Darling
[1] 0.5028619
$p_value
[1] 0.1917

SmallChess
- 6,764
- 4
- 27
- 48
-
The link to the qualityTools package no longer seems to work, perhaps https://CRAN.R-project.org/package=qualityTools is better? – mdewey Aug 28 '18 at 12:11
-
-