Categories &

Functions List

Function Reference: loglinv

statistics: x = loglinv (p, mu, sigma)

Inverse of the log-logistic cumulative distribution function (iCDF).

For each element of p, compute the quantile (the inverse of the CDF) of the log-logistic distribution with mean parameter mu and scale parameter sigma. The size of x is the common size of p, mu, and sigma. A scalar input functions as a constant matrix of the same size as the other inputs.

Mean of logarithmic values mu must be a non-negative real value, scale parameter of logarithmic values sigma must be a positive real value and p is supported in the range [0,1], otherwise NaN is returned.

Further information about the loglogistic distribution can be found at https://en.wikipedia.org/wiki/Log-logistic_distribution

OCTAVE/MATLAB use an alternative parameterization given by the pair μ, σ, i.e. mu and sigma, in analogy with the logistic distribution. Their relation to the α and b parameters used in Wikipedia are given below:

  • mu = log (a)
  • sigma = 1 / a

See also: loglcdf, loglpdf, loglrnd, loglfit, logllike, loglstat

Source Code: loglinv

Example: 1

Plot various iCDFs from the log-logistic distribution

 p = 0.001:0.001:0.999;
 x1 = loglinv (p, log (1), 1/0.5);
 x2 = loglinv (p, log (1), 1);
 x3 = loglinv (p, log (1), 1/2);
 x4 = loglinv (p, log (1), 1/4);
 x5 = loglinv (p, log (1), 1/8);
 plot (p, x1, '-b', p, x2, '-g', p, x3, '-r', p, x4, '-c', p, x5, '-m')
 ylim ([0, 20])
 grid on
 legend ({'σ = 2 (β = 0.5)', 'σ = 1 (β = 1)', 'σ = 0.5 (β = 2)', ...
          'σ = 0.25 (β = 4)', 'σ = 0.125 (β = 8)'}, 'location', 'northwest')
 title ('Log-logistic iCDF')
 xlabel ('probability')
 ylabel ('x')
 text (0.03, 12.5, 'μ = 0 (α = 1), values of σ (β) as shown in legend')
plotted figure