KSGOF estimates p-value for the goodness of a given fit using Kolmogorov - Smirnov statistics.
The goodness-of-fit can be estimated for five statistical distributions: the power law, power law with exponential cutoff, exponential, stretched exponential, and log-normal.
The empirical dataset should be provided in the binned form, i.e as two vectors containing bin edges and corresponding bin counts. The algorithm is insensitive to the binning scheme.
KSGOF is inspired by http://tuvalu.santafe.edu/~aaronc/powerlaws/bins/bplpva.m and requires best fit parameter estimates, which can be calculated using the scripts provided at http://tuvalu.santafe.edu/~aaronc/powerlaws/bins/
Maria Mukhina. (2020). Kolmogorov - Smirnov test of the goodness-of-fit (https://www.mathworks.com/matlabcentral/fileexchange/78038-kolmogorov-smirnov-test-of-the-goodness-of-fit), MATLAB Central File Exchange. Retrieved July 11, 2020.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!