fit_dist_test: Summary of Godness-of-fit tests

Description Usage Arguments Value Author(s) See Also Examples

Description

Returns a data frame with the summary of Fiting distribution tests for the following distributions: "normal","log-normal","geometric","exponential","Poisson", "cauchy" , "logistic" and "weibull".

The considered Godness-of-fit tests are: Bayesian Information Criterium (BIC), Akaike Information Criterium (AIC), Kolmogorov-Smirnov test and Anderson-Darling test.

Usage

1

Arguments

x

A numeric vector of length at least one containing only finite values

Value

Distribution

Name of the tested distribution

BayesianIC

Bayesian Information Criterium (BIC)

AkaikeIC

Akaike Information Criterium (AIC)

Kol-SmirD

The value of the Kolmogorov-Smirnov test statistic

Kol-SmirPvalue

The value of the Kolmogorov-Smirnov test p-value

Signigicance KS

A column to check the significance of the Kolmogorov-Smirnov test

And-Darl

The value of the nderson-Darling test statistic

And-DarlPvalue

The value of the Anderson-Darling test p-value

Signigicance AD

A column to check the significance of the Anderson-Darling test

Author(s)

F. Barrio-Parra

See Also

ad.test library(kSamples), AIC library(stats), BIC library(stats), ks.test library(stats),

Examples

1
2
3
4
5
6
7
8
9
set.seed(123)

a <- rnorm(n=100, mean =10, sd = 1) 

fit_dist_test(a)

b<- rexp(n = 100,rate = 1)

fit_dist_test(b)

Example output

  Distribution BayesianIC AkaikeIC  Kol-SmirD Kol-SmirPvalue Signigicance KS
1       normal   273.7488 268.5385 0.05871913   8.807748e-01     Significant
2   log-normal   274.3479 269.1376 0.04697067   9.801048e-01     Significant
7     logistic   276.0678 270.8574 0.06351376   8.146307e-01     Significant
8      weibull   282.6610 277.4507 0.07732243   5.882538e-01     Significant
6       cauchy   310.7243 305.5139 0.08988696   3.942963e-01     Significant
4  exponential   666.9222 664.3170 0.54127491   0.000000e+00 Not-significant
3    geometric        Inf      Inf 0.56278080   0.000000e+00 Not-significant
5      Poisson        Inf      Inf 0.31273263   6.398565e-09 Not-significant
  And-Darl And-DarlPvalue Signigicance AD
1  30.5540     1.5087e-13 Not-significant
2   4.0506     7.9899e-03 Not-significant
7  30.5150     1.5656e-13 Not-significant
8   4.0506     7.9899e-03 Not-significant
6  25.7310     1.5688e-11 Not-significant
4  27.4510     2.9937e-12 Not-significant
3  33.2880     1.0848e-14 Not-significant
5   4.0506     7.9899e-03 Not-significant
There were 50 or more warnings (use warnings() to see the first 50)
  Distribution BayesianIC AkaikeIC  Kol-SmirD Kol-SmirPvalue Signigicance KS
4  exponential   193.8766 191.2714 0.05165652   9.523506e-01     Significant
8      weibull   198.3690 193.1586 0.04358561   9.913031e-01     Significant
2   log-normal   210.6861 205.4758 0.08169615   5.168090e-01     Significant
6       cauchy   272.0715 266.8611 0.20583591   4.177878e-04 Not-significant
7     logistic   274.0874 268.8770 0.16982334   6.252049e-03 Not-significant
1       normal   288.3294 283.1191 0.17439373   4.564314e-03 Not-significant
3    geometric        Inf      Inf 0.51340754   0.000000e+00 Not-significant
5      Poisson        Inf      Inf 0.38760427   1.785239e-13 Not-significant
  And-Darl And-DarlPvalue Signigicance AD
4 -0.80606     8.6126e-01     Significant
8 -0.05944     3.8148e-01     Significant
2 -0.52289     6.4529e-01     Significant
6 11.38100     1.5695e-05 Not-significant
7  8.58040     1.8609e-04 Not-significant
1  2.65080     2.6893e-02 Not-significant
3 30.58700     1.4612e-13 Not-significant
5  4.05060     7.9899e-03 Not-significant
There were 50 or more warnings (use warnings() to see the first 50)

EnviroPRA documentation built on May 1, 2019, 8:21 p.m.