I am currently working through the methodology in the fitdistrplus package documentation for Rstudio (fitdistrplus: An R Package for Fitting Distributions | Journal of Statistical Software)in order to assist me in finding a suitable fitted distribution to my data. I have 29 observations (so a relatively small dataset) of donations to a University, and have taken the logarithm of these. I have fit both Weibull and Normal distributions to this logged dataset using the
fitdist function, and am now using the
gofstat function to return the outcomes of the 3 tests specified in this function. When running the code chunk below, the test outcome is "not computed" for the cvmtest (cramer von mises) and the adtest (anderson darling). Is this due to my small sample size, and is ther anything I can change to produce a test result?
(Note fln1 and flw1 are the fitted weibull and normal distributions respectively).
ingof = gofstat(list(fln1, flw1), fitnames = c("Normal", "Weibull")) ingof ingof$kstest ingof$cvmtest ingof$adtest
The r console output
Goodness-of-fit statistics Normal Kolmogorov-Smirnov statistic 0.06122030 Cramer-von Mises statistic 0.01605683 Anderson-Darling statistic 0.13297621 Weibull Kolmogorov-Smirnov statistic 0.08153736 Cramer-von Mises statistic 0.02123806 Anderson-Darling statistic 0.15927092 Goodness-of-fit criteria Normal Weibull Akaikes Information Criterion 154.8863 154.5585 Bayesian Information Criterion 157.9970 157.6692 > ingof$kstest Normal Weibull "not rejected" "not rejected" > ingof$cvmtest Normal Weibull "not computed" "not rejected" > ingof$adtest Normal Weibull "not computed" "not rejected"