| m2df {distrEx} | R Documentation |
Generic function for the computation of clipped second moments.
The moments are clipped at upper.
m2df(object, upper, ...)
## S4 method for signature 'AbscontDistribution':
m2df(object, upper,
lowerTruncQuantile = getdistrExOption("m2dfLowerTruncQuantile"),
rel.tol = getdistrExOption("m2dfRelativeTolerance"), ...)
object |
object of class "Distribution" |
upper |
clipping bound |
rel.tol |
relative tolerance for distrExIntegrate. |
lowerTruncQuantile |
lower quantile for quantile based integration range. |
... |
additional arguments to E |
The precision of the computations can be controlled via
certain global options; cf. distrExOptions.
The second moment of object clipped at upper is computed.
E(object, upp=upper, fun = function, ...).
integrate. support and sum. X0. pbinom. ppois. dnorm and pnorm. pexp. pchisq. Matthias Kohl Matthias.Kohl@stamats.de
# standard normal distribution
N1 <- Norm()
m2df(N1, 0)
# Poisson distribution
P1 <- Pois(lambda=2)
m2df(P1, 3)
m2df(P1, 3, fun = function(x)sin(x))
# absolutely continuous distribution
D1 <- Norm() + Exp() # convolution
m2df(D1, 2)
m2df(D1, Inf)
E(D1, function(x){x^2})