tlnorm: Truncated lognormal distribution functions

Description Usage Arguments Value Examples

Description

pdf, cdf, inverse cdf, and random deviates of the truncated lognormal distribution.

Usage

1
2
3
4
5
6
7
rtlnorm(n, meanlog = 0, sdlog = 1, a = 0, b = Inf)

dtlnorm(x, meanlog = 0, sdlog = 1, a = 0, b = Inf)

ptlnorm(q, meanlog = 0, sdlog = 1, a = 0, b = Inf)

qtlnorm(p, meanlog = 0, sdlog = 1, a = 0, b = Inf)

Arguments

n

number of observations. If length(n) > 1, the length is taken to be the number required.

meanlog

vector of means on the natural log scale.

sdlog

vector of standard deviations on the natural log scale.

a

vector of lower truncation limits

b

vector of upper truncation limits

x, q

vector of quantiles.

p

vector of probabilities.

Value

dtlnorm gives the density, ptlnorm gives the distribution function, qtlnorm gives the quantile function, and rtlnorm generates random deviates.

Examples

1
2
3
4
 rtlnorm(5, 1, 2, 0.5, 3.0)
 dtlnorm(seq(0, 4, by=0.5), 1, 2, 0.5, 3.0)
 ptlnorm(seq(0, 4, by=0.5), 1, 2, 0.5, 3.0)
 qtlnorm(seq(0, 1, by=0.1), 1, 2, 0.5, 3.0)

bertcarnell/truncateddist documentation built on May 11, 2021, 11:07 a.m.