knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "tools/README-" )
logitnorm
package provides support for the univariate
logit-normal
distribution. In
addition to the usual random, density, percentile, and quantile function, it
helps with estimating distribution parameters from observations statistics.
# From CRAN install.packages("logitnorm") # Or the the development version from GitHub: # install.packages("devtools") devtools::install_github("bgctw/logitnorm")
See the package vignette for an introduction.
A simple example estimates distribution parameters from observation statistics of mode 0.7 and upper quantile 0.9. Next, the density is computed and plotted across a range of quantiles.
(theta <- twCoefLogitnormMLE(0.7,0.9)) x <- seq(0,1, length.out=81) d <- dlogitnorm(x, mu=theta[1,"mu"], sigma=theta[1,"sigma"]) plot(d~x,type="l") abline(v=c(0.7,0.9), col="grey")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.