Skip to contents

Returns a tbl data frame with the following columns

dist

The distribution name (chr)

aic

Akaike's Information Criterion (dbl)

bic

Bayesian Information Criterion (dbl)

and if the data are non-censored

aicc

Akaike's Information Criterion corrected for sample size (dbl)

and if there are 8 or more samples

ad

Anderson-Darling statistic (dbl)

ks

Kolmogorov-Smirnov statistic (dbl)

cvm

Cramer-von Mises statistic (dbl)

In the case of an object of class fitdists the function also returns

delta

The Information Criterion differences (dbl)

weight

The Information Criterion weights (dbl)

where delta and weight are based on aic for censored data and aicc for non-censored data.

Usage

ssd_gof(x, ...)

# S3 method for fitdists
ssd_gof(x, pvalue = FALSE, ...)

Arguments

x

The object.

...

Unused.

pvalue

A flag specifying whether to return p-values or the statistics (default) for the various tests.

Value

A tbl data frame of the gof statistics.

Methods (by class)

  • ssd_gof(fitdists): Goodness of Fit

Examples

fits <- ssd_fit_dists(ssddata::ccme_boron)
ssd_gof(fits)
#> # A tibble: 6 × 9
#>   dist           ad     ks    cvm   aic  aicc   bic delta weight
#>   <chr>       <dbl>  <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl>  <dbl>
#> 1 gamma       0.440 0.117  0.0554  238.  238.  240. 0.005  0.357
#> 2 lgumbel     0.829 0.158  0.134   244.  245.  247. 6.56   0.013
#> 3 llogis      0.487 0.0994 0.0595  241.  241.  244. 3.39   0.066
#> 4 lnorm       0.507 0.107  0.0703  239.  240.  242. 1.40   0.177
#> 5 lnorm_lnorm 0.320 0.116  0.0414  240.  243.  247. 4.98   0.03 
#> 6 weibull     0.434 0.117  0.0542  238.  238.  240. 0      0.357
ssd_gof(fits)
#> # A tibble: 6 × 9
#>   dist           ad     ks    cvm   aic  aicc   bic delta weight
#>   <chr>       <dbl>  <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl>  <dbl>
#> 1 gamma       0.440 0.117  0.0554  238.  238.  240. 0.005  0.357
#> 2 lgumbel     0.829 0.158  0.134   244.  245.  247. 6.56   0.013
#> 3 llogis      0.487 0.0994 0.0595  241.  241.  244. 3.39   0.066
#> 4 lnorm       0.507 0.107  0.0703  239.  240.  242. 1.40   0.177
#> 5 lnorm_lnorm 0.320 0.116  0.0414  240.  243.  247. 4.98   0.03 
#> 6 weibull     0.434 0.117  0.0542  238.  238.  240. 0      0.357