Learn R Programming

convdistr (version 1.6.1)

TRUNCATED: Factory for a TRUNCATED distribution object

Description

Returns an TRUNCATED distribution object that limits the values that are generated by the distribution to be in the limits p_min, p_max

Usage

new_TRUNCATED(p_distribution, p_min = -Inf, p_max = Inf)

Value

An object of class DISTRIBUTION,

p_distribution$distribution, TRUNCATED

Arguments

p_distribution

An object of class DISTRIBUTION to truncate

p_min

A numeric that set the lower limit of the distribution

p_max

A numeric that set the upper limit of the distribution

Author

John J. Aponte

Examples

Run this code
myDistr <- new_TRUNCATED(p_distribution = new_NORMAL(0,1), p_min = -1, p_max = 1)
myDistr$rfunc(10)

Run the code above in your browser using DataLab