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 download page on R-Forge
- To install this package directly within R type:
The package comes with documentaion and examples.
Within R type:
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.
Fig. 1 Density for for various combinations of mu and sigma.
Plot the cumulative distribution
> x <- seq(0, 1, length.out = 81)
> d <- plogitnorm(x, mu = 0.5, sigma = 0.5)
> plot(d ~ x, type = "l")
Mean and Variance
The moments have no analytical solution. This package estimates them
by numerical integration:
estimate mean and standard deviation.
> (theta <- momentsLogitnorm(mu = 0.6, sigma = 0.5))
The mode is found by setting derivatives to zero and optimizing
the resulting equation:
estimate the mode
> (mle <- modeLogitnorm(mu = 0.6, sigma = 0.5))
from upper quantile and
- mode (Maximum Likelihood Estimate)
- mean (Expected value)
estimate the parameters, with mode 0.7 and upper quantile 0.9
> (theta <- twCoefLogitnormMLE(0.7, 0.9))
Frederic, P. & Lad, F. (2008)
Two Moments of the Logitnormal Distribution.
Communications in Statistics-Simulation and Computation,
Generated by sweave on: 2010-09-17.
The project summary page you can find here.