dtrunc: Probability density function of truncated random variables

Description Usage Arguments Details Value Author(s) References Examples

Description

This function computes values for the probability density function of a truncated random variable.

Usage

1
dtrunc(x, spec, a = -Inf, b = Inf, ...)

Arguments

x

A numeric vector of quantile values

spec

a character value that specifies the underlying probability distribution

a

a numeric value for the lower bound of the random variable

b

a numeric value for the upper bound of the random variable

...

other arguments are are passed to the corresponding quantile function

Details

The R function is used to access the required probability density and cumulative distribution functions of the underlying unrestricted random variable.

Value

A vector of density function values.

Author(s)

Frederick Novomestky [email protected]

Saralees Nadarajah [email protected]

References

Nadarajah, S. and S. Kotz, 2006. R Programs for Computing Truncated Distributions, Journal of Statistical Software, 16, August 2006, http://www.jstatsoft.org/v16/c02

Examples

1
2
x <- seq( 0, 3, .1 )
pdf <- dtrunc( x, spec="norm", a=1, b=2 )

Example output

Loading required package: stats4
Loading required package: evd

truncdist documentation built on May 2, 2019, 9:41 a.m.