Usage
mTruncNorm(r = 1, mu = 0, sd = 1, lower = -Inf, upper = Inf,
approximation = c("int2", "laplace", "numerical"),
integral.only = FALSE, ...)
mTruncNorm.int2(r = as.integer(1), mu = 0, sd = 1, lower = -Inf,
upper = Inf, takeLog = TRUE, ndiv = 8)
Arguments
r
the order of moments to be computed. It could be noninteger, but has to be nonnegative. This is also the degrees of freedom for the noncentral t-distribution.
mu
mean of the normal distribution, before truncating.
sd
SD of the normal distribution, before truncating.
lower
lower truncation point
upper
upper truncation point
approximation
Method of approximation. int2
is exact for integer r
and interpolate to noninteger r
.
laplace
uses laplacian approximation. numerical
uses nuemerical integration.
integral.only
logical. If TRUE
, only the integral in noncentral t-distribution is returned. Otherwise, it is normalized to be the rth moments of truncated normal distribution.
takeLog
logical. If TRUE
and r
is not an integer, the polyomial interpolation will be on the log scale. But final result is on the original scale.
ndiv
number of points with closes integer r
to be used in polynomial interpolation.
...
other arguments passed to mTruncNorm.int2