### Function Reference: `loglcdf`

statistics: p = loglcdf (x, mu, sigma)
statistics: p = loglcdf (x, mu, sigma, `"upper"`)

Loglogistic cumulative distribution function (CDF).

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

Both parameters, mu and sigma, must be positive reals and x is supported in the range [0,inf), otherwise `NaN` is returned.

`p = loglcdf (x, mu, sigma, "upper")` computes the upper tail probability of the log-logistic distribution with parameters mu and sigma, at the values in x.

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: loglinv, loglpdf, loglrnd, loglfit, logllike, loglstat

Source Code: loglcdf

### Example: 1

     ## Plot various CDFs from the log-logistic distribution
     x = 0:0.001:2;
     p1 = loglcdf (x, log (1), 1/0.5);
     p2 = loglcdf (x, log (1), 1);
     p3 = loglcdf (x, log (1), 1/2);
     p4 = loglcdf (x, log (1), 1/4);
     p5 = loglcdf (x, log (1), 1/8);
     plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c", x, p5, "-m")
     legend ({"σ = 2 (β = 0.5)", "σ = 1 (β = 1)", "σ = 0.5 (β = 2)", ...
              "σ = 0.25 (β = 4)", "σ = 0.125 (β = 8)"}, "location", "northwest")
     grid on
     title ("Log-logistic CDF")
     xlabel ("values in x")
     ylabel ("probability")
     text (0.05, 0.64, "μ = 0 (α = 1), values of σ (β) as shown in legend")