About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconFit all valid parametric probability distributions to data (Scripts) Publisher's description

ALLFITDIST Fit all valid parametric probability distributions to data.

ALLFITDIST Fit all valid parametric probability distributions to data.

[D PD] = ALLFITDIST(X) fits all valid parametric probability distributions to the data in column vector X, and returns a struct D of fitted distributions and parameters and a struct of objects PD representing the fitted distributions. PD is an object in a class derived from the ProbDist class.

[...] = ALLFITDIST(X,SORTBY) returns the struct of valid distributions sorted by the parameter SORTBY
NLogL - Negative of the log likelihood
BIC - Bayesian information criterion (default)
AIC - Akaike information criterion
AICc - AIC with a correction for finite sample sizes

[...] = ALLFITDIST(X,SORTBY,'NAME1',VALUE1,'NAME2',VALUE2,...) follows the same input format as FITDIST, specifying optional argument name/value pairs.

[...] = ALLFITDIST(...,'DISCRETE') specifies it is a discrete distribution and do not attempt to fit a continuous distribution to the data

[...] = ALLFITDIST(...,'PDF') or (...,'CDF') plots either the PDF or CDF of a subset of the fitted distribution. The distributions are plotted in order of fit, according to SORTBY.

List of distributions it will try to fit
Continuous (default)
Extreme value
Generalized extreme value
Generalized Pareto
Inverse Gaussian
t location-scale

Discrete ('DISCRETE')
Negative binomial

Note: If 'n' for binomial data is not given, as per FITDIST notation, then the Method of Moments estimate will be calculated. Additionally, ALLFITDIST does not handle nonparametric kernel-smoothing, use FITDIST directly instead.

Given random data from an unknown continuous distribution, find the best distribution which fits that data, and plot the PDFs to compare graphically.

x = normrnd(5,3,1e4,1); %Assumed from unknown distribution
[D PD] = allfitdist(x,'PDF'); %Compute and plot results
D(1) %Show output from best fit

Given random data from a discrete unknown distribution, with frequency data, find the best discrete distribution which would fit that data, sorted by 'NLogL', and plot the CDFs to compare graphically.

x = nbinrnd(20,.3,1e4,1);
values=unique(x); freq=histc(x,values);
[D PD] = allfitdist(values,'NLogL','frequency',freq,'CDF','DISCRETE');

Although the Geometric Distribution is not listed, it is a special case of fitting the more general Negative Binomial Distribution. The parameter 'r' should be close to 1. Show by example.

r=geornd(.7,1e4,1); %Random from Geometric
[D PD]= allfitdist(r,'PDF','DISCRETE');

Compare the resulting distributions under two different assumptions of discrete data. The first, that it is known to be derived from a Binomial Distribution with known 'n'. The second, that it may be Binomial but 'n' is unknown and should be estimated. Note the second scenario may not yield a Binomial Distribution as the best fit, if 'n' is estimated incorrectly. (Best to run example a couple times to see effect)

r = binornd(10,.3,1e2,1);
[D1 PD1] = allfitdist(r,'n',10,'DISCRETE','PDF'); %Force binomial
[D2 PD2] = allfitdist(r,'DISCRETE','PDF'); %May be binomial
PD1{1}, PD2{1} %Compare distributions

System Requirements:

No special requirements.
Program Release Status: New Release
Program Install Support: Install and Uninstall

Fit all valid parametric probability distributions to data (Scripts) Tags:

Click on a tag to find related softwares

Is Fit all valid parametric probability distributions to data (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.