knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "tools/README-"
)

CRAN_Status_Badge Travis-CI Build Status

Overview

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.

Installation

# From CRAN
install.packages("logitnorm")

# Or the the development version from GitHub:
# install.packages("devtools")
devtools::install_github("bgctw/logitnorm")

Usage

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")


bgctw/logitnorm documentation built on Feb. 2, 2024, 12:57 a.m.