Loglogistic probability distribution object
LoglogisticDistribution object consists of parameters, a
model description, and sample data for a loglogistic probability
The loglogistic distribution is closely related to the logistic distribution. If x is distributed loglogistically with parameters μ and σ, then log(x) is distributed logistically with mean and standard deviation. This distribution is often used in survival analysis to model events that experience an initial rate increase, followed by a rate decrease.
The loglogistic distribution uses the following parameters.
|Mean of logarithmic values|
|Scale parameter of logarithmic values|
There are several ways to create a
probability distribution object.
Create a distribution with specified parameter values using
Fit a distribution to data using
Interactively fit a distribution to data using the Distribution Fitter app.
mu — Mean of logarithmic values
positive scalar value
Mean of logarithmic values for the loglogistic distribution, specified as a positive scalar value.
sigma — Scale parameter of logarithmic values
positive scalar value
Scale parameter of logarithmic values for the loglogistic distribution, specified as a positive scalar value.
Other Object Properties
|Cumulative distribution function|
|Gather properties of Statistics and Machine Learning Toolbox object from GPU|
|Inverse cumulative distribution function|
|Interquartile range of probability distribution|
|Mean of probability distribution|
|Median of probability distribution|
|Negative loglikelihood of probability distribution|
|Confidence intervals for probability distribution parameters|
|Probability density function|
|Plot probability distribution object|
|Profile likelihood function for probability distribution|
|Standard deviation of probability distribution|
|Truncate probability distribution object|
|Variance of probability distribution|
Create a Loglogistic Distribution Object Using Default Parameters
Create a loglogistic distribution object using the default parameter values.
pd = makedist('Loglogistic')
pd = LoglogisticDistribution Log-Logistic distribution mu = 0 sigma = 1
Create a Loglogistic Distribution Object Using Specified Parameters
Create a loglogistic distribution object by specifying the parameter values.
pd = makedist('Loglogistic','mu',5,'sigma',2)
pd = LoglogisticDistribution Log-Logistic distribution mu = 5 sigma = 2
Generate random numbers from the loglogistic distribution and compute their log values.
rng(19) % for reproducibility x = random(pd,10000,1); logx = log(x);
Compute the mean of the log values.
m = mean(logx)
m = 4.9828
The mean of the log of
x is equal to the
mu parameter of
x has a loglogistic distribution.
The plot shows that the log values of
x have a logistic distribution.
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
Usage notes and limitations:
LoglogisticDistributioncan be a probability distribution object fitted by using
fitdistwith GPU array input arguments.
The object functions of
LoglogisticDistributionfully support GPU arrays.
For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Introduced in R2013a
fitdist | Distribution Fitter