AD {EDFtest} | R Documentation |
Anderson-Darling statistic
Description
Compute the Anderson-Darling goodness-of-fit statistic A^2
for an i.i.d sample,
x, to test for the given distribution with parameters unknown.Estimate parameters by ML
using EDFtest
MLE function by default.
Usage
AD.uniform(x, parameter = estimate.uniform(x))
AD.normal(x, parameter = estimate.normal(x))
AD.gamma(x, parameter = estimate.gamma(x))
AD.logistic(x, parameter = estimate.logistic(x))
AD.laplace(x, parameter = estimate.laplace(x))
AD.weibull(x, parameter = estimate.weibull(x))
AD.extremevalue(x)
AD.exp(x, parameter = estimate.exp(x))
AD(z)
Arguments
x |
A random sample. |
parameter |
Parameters of the given distribution, MLE by default. |
z |
A standard uniform random sample. |
Value
Anderson-Darling statistic of the given sample.
See Also
estimate
for estimating distribution parameters by ML;
CvM
for calculating Cramér-von Mises statistic;
Watson
for calculating Watson statistic;
AD.pvalue
for calculating P-value of Anderson-Darling statistic.
Examples
x0=runif(n=100,min=-1,max=1)
AD.uniform(x0)
x1=rnorm(n=100,mean=0,sd=1)
AD.normal(x1)
x2=rgamma(n=100,shape=1,scale=1)
AD.gamma(x2)
x3=rlogis(n=100,location=0,scale=1)
AD.logistic(x3)
x4= rmutil::rlaplace(n=100,m=0,s=1)
AD.laplace(x4)
x5=rweibull(n=100,shape=1,scale=1)
AD.weibull(x5)
x5_log=log(x5)
AD.extremevalue(x5_log)
x6=rexp(n=100,rate=1/2)
AD.exp(x6)
[Package EDFtest version 0.1.0 Index]