Utilities for the logitnormal distribution in R

Share:

Description

Utilities for the logitnormal distribution in R

  • Density, distribution, quantile and random generation function.

  • Estimation of the mode and the first two moments.

  • Estimation of distribution parameters from observations.

Details

The logitnormal distribution is useful as a prior density for variables that are bounded between 0 and 1, such as proportions. Fig. 1 displays its density for various combinations of parameters mu and sigma.

The package provides the main distribution functions:

  • density dlogitnorm,

  • distribution plogitnorm,

  • quantile qlogitnorm, and

  • random generation function rlogitnorm.

Transformation functions

  • (0,1) -> (-Inf,Inf): logit

  • (-Inf,Inf) -> (0,1): invlogit

Moments and mode

  • Expected value and variance: momentsLogitnorm

  • Mode: modeLogitnorm

Estimating parameters

  • from mode and upper quantile: twCoefLogitnormMLE

  • from mode and constraint to be unimodal and maximally flat: twCoefLogitnormMLEFlat

  • from median and upper quantile: twCoefLogitnorm

  • from expected value, i.e. mean and upper quantile: twCoefLogitnormE

  • from a confidence interval which is symmetric at normal scale: twCoefLogitnormCi

  • from prescribed quantiles: twCoefLogitnormN

Author(s)

Thomas Wutzler

References

Frederic, P. & Lad, F. (2008) Two Moments of the Logitnormal Distribution. Communications in Statistics-Simulation and Computation, 37, 1263-1269