Description Usage Arguments Value Methods See Also Examples
Truncatemethods
1 2 3 4 5 6 7 8 9 10  Truncate(object, ...)
## S4 method for signature 'AbscontDistribution'
Truncate(object, lower = Inf, upper = Inf)
## S4 method for signature 'DiscreteDistribution'
Truncate(object, lower= Inf, upper = Inf)
## S4 method for signature 'LatticeDistribution'
Truncate(object, lower= Inf, upper = Inf)
## S4 method for signature 'UnivarLebDecDistribution'
Truncate(object, lower = Inf, upper = Inf,
withSimplify = getdistrOption("simplifyD"))

object 
distribution object 
... 
not yet used; takes up 
lower 
numeric; lower truncation point 
upper 
numeric; upper truncation point 
withSimplify 
logical; is result to be piped through a call to

the corresponding distribution of the truncated random variable
signature(object = "AbscontDistribution")
:
returns the distribution of min(upper,max(X,lower))
conditioned to lower<=X<=upper
, if X
is
distributed according to object
;
if slot .logExact
of argument object
is TRUE
and if either there is only onesided truncation or both truncation
points lie on the same side of the median, we use this representation
to enhance the range of applicability, in particular, for slot r
,
we profit from Peter Dalgaard's clever logtricks as indicated in
http://r.789695.n4.nabble.com/helponsamplingfromthetruncatednormalgammadistributiononthefarendprobabilityisverylowtd868119.html#a868120. To this
end we use the internal functions
(i.e.; non exported to namespace) .trunc.up
and
.trunc.low
which provide functional slots r,d,p,q
for
onesided truncation. In case of two sided truncation, we simply use onesided
truncation successively — first left and then right in case we are right of
the median, and the other way round else;
the result is again of class "AbscontDistribution"
;
signature(object = "DiscreteDistribution")
:
returns the distribution of min(upper,max(X,lower))
conditioned to lower<=X<=upper
, if X
is
distributed according to object
;
the result is again of class "DiscreteDistribution"
signature(object = "LatticeDistribution")
:
if length of the corresp. lattice
is infinite and
slot .logExact
of argument object
is TRUE
,
we proceed similarly as in case of AbscontDistribution
, also
using internal functions .trunc.up
and .trunc.low
;
else we use the corresponding "DiscreteDistribution"
method;
the result is again of class "LatticeDistribution"
signature(object = "UnivarLebDecDistribution")
:
returns the distribution of min(upper,max(X,lower))
conditioned to lower<=X<=upper
, if X
is
distributed according to object
;
the result is again of class "UnivarLebDecDistribution"
1 2 3 4 5 6 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.