fitdist
Fit probability distribution object to data
Syntax
Description
creates
the probability distribution object with additional options specified
by one or more name-value pair arguments. For example, you can indicate
censored data or specify control parameters for the iterative fitting
algorithm.pd
= fitdist(x
,distname
,Name,Value
)
[
creates
probability distribution objects by fitting the distribution specified
by pdca
,gn
,gl
]
= fitdist(x
,distname
,'By',groupvar
)distname
to the data in x
based
on the grouping variable groupvar
. It returns
a cell array of fitted probability distribution objects, pdca
,
a cell array of group labels, gn
, and a cell
array of grouping variable levels, gl
.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Algorithms
The fitdist
function fits most distributions
using maximum likelihood estimation. Two exceptions are the normal
and lognormal distributions with uncensored data.
For the uncensored normal distribution, the estimated value of the sigma parameter is the square root of the unbiased estimate of the variance.
For the uncensored lognormal distribution, the estimated value of the sigma parameter is the square root of the unbiased estimate of the variance of the log of the data.
Alternative Functionality
The Distribution Fitter app opens a graphical user interface for you to import data from the workspace and interactively fit a probability distribution to that data. You can then save the distribution to the workspace as a probability distribution object. Open the Distribution Fitter app using
distributionFitter
at the command line, or click Distribution Fitter on the Apps tab.To fit a distribution to left-censored, double-censored, or interval-censored data, use
mle
. You can find the maximum likelihood estimates by using themle
function, and create a probability distribution object by using themakedist
function. For an example, see Find MLEs for Double-Censored Data.
References
[1] Johnson, N. L., S. Kotz, and N. Balakrishnan. Continuous Univariate Distributions. Vol. 1, Hoboken, NJ: Wiley-Interscience, 1993.
[2] Johnson, N. L., S. Kotz, and N. Balakrishnan. Continuous Univariate Distributions. Vol. 2, Hoboken, NJ: Wiley-Interscience, 1994.
[3] Bowman, A. W., and A. Azzalini. Applied Smoothing Techniques for Data Analysis. New York: Oxford University Press, 1997.