gof_tests: Goodness of Fit Testing

Description Usage Arguments Value Examples

View source: R/diagnostics.R

Description

Apply all goodness of fit tests and return a data.frame with the results

Usage

1
gof_tests(fits, x)

Arguments

fits

a list object produced from fit_univariate, fit_empirical, or fit_univariate_man

x

numeric vector of sample data

Value

a data.frame of test statistic results for each distribution

Examples

1
2
3
4
5
set.seed(84)
x <- rgamma(100, 1, 1)
dists <- c('gamma', 'lnorm', 'weibull')
multipleFits <- lapply(dists, fit_univariate, x = x)
gof_tests(multipleFits, x)

Example output

  distribution ks_statistic ks_p_value ad_statistic ad_p_value cv_statistic
1        gamma   0.09148230 0.37259701    0.6894059 0.56735453   0.12941452
2        lnorm   0.15167137 0.02008675    2.8709299 0.03193707   0.50728236
3      weibull   0.07223744 0.67373787    0.4375504 0.81047531   0.07674045
  cv_p_value
1 0.45953635
2 0.03796115
3 0.71201030

fitur documentation built on Oct. 6, 2021, 5:06 p.m.