TRUNCATED {convdistr} | R Documentation |
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)
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 |
Value
An object of class DISTRIBUTION
,
p_distribution$distribution
, TRUNCATED
Note
The expected value of a truncated distribution could be very
different from the expected value of the unrestricted distribution. Be
careful as the oval
field is not changed and may not represent
any more the expected value of the distribution.
If the distribution is multidimensional, the limits will apply to all dimensions.
Author(s)
John J. Aponte
Examples
myDistr <- new_TRUNCATED(p_distribution = new_NORMAL(0,1), p_min = -1, p_max = 1)
myDistr$rfunc(10)
[Package convdistr version 1.6.2 Index]