Wrappers to compute goodness of fit test froms distfun objects

ks_test(distfun, x, ...)

# S3 method for distfun
ad_test(distfun, x)

ad_test(distfun, x)

# S3 method for distfun
cvm_test(distfun, x)

cvm_test(distfun, x)

Arguments

distfun

a distfun object

x

numeric vector

...

arguments to be passed on to test function

Value

goodness of fit object

Examples

x <- rgamma(100, 1, 1) fit <- fit_univariate(x, 'gamma') ks_test(fit, x)
#> #> One-sample Kolmogorov-Smirnov test #> #> data: x #> D = 0.048874, p-value = 0.9707 #> alternative hypothesis: two-sided #>
ad_test(fit, x)
#> #> Anderson-Darling test of goodness-of-fit #> Null hypothesis: distribution 'distfun[[2]]' #> #> data: x #> An = 0.23087, p-value = 0.9796 #>
cvm_test(fit, x)
#> #> Cramer-von Mises test of goodness-of-fit #> Null hypothesis: distribution 'distfun[[2]]' #> #> data: x #> omega2 = 0.033832, p-value = 0.9626 #>