Last chance! 50% off unlimited learning
Sale ends in
ad.test(x, distr.fun, ...)
pnorm
, punif
, etc. htest
exactly like for the Kolmogorov-Smirnov test, ks.test
.
The statistic
and p.value
fields are the most relevant ones.
distr.fun
is provided, the function checks whether x
is a iid sample from the distribution described by such CDF.
Otherwise, whether they follow a uniform law.
set.seed( 123 )
x <- runif( 100 )
ad.test( x )$p.value
ad.test( x, pnorm, 0, 1 )$p.value
replicate( ad.test( rnorm( 100 ), pnorm )$p.value, 100 )
Run the code above in your browser using DataLab