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?
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.
adSim(x, "normal", NA)
$distribution  "normal" $parameter_estimation mean sd 32.450662 1.717755 $Anderson_Darling  0.5028619 $p_value  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).
adSim(x, "normal", 10000)
... simulating the Anderson-Darling distribution by 10000 bootstraps for normal distribution... $distribution  "normal" $parameter_estimation mean sd 32.450662 1.717755 $Anderson_Darling  0.5028619 $p_value  0.1917