rtnorm90ci {decisionSupport} | R Documentation |
90%-confidence interval based truncated normal random number generation.
Description
rtnorm90ci
generates truncated normal random numbers based on the 90% confidence interval
calculating the distribution parameter numerically from the 90%-confidence interval or via a
fit on the 90%-confidence interval. The fit might include the median or not.
rposnorm90ci
generates positive normal random numbers based on the 90% confidence interval.
It is a wrapper function for rtnorm90ci
.
rtnorm_0_1_90ci
generates normal random numbers truncated to [0,1]
based on the
90% confidence interval. It is a wrapper function for rtnorm90ci
.
Usage
rtnorm90ci(
n,
ci,
median = mean(ci),
lowerTrunc = -Inf,
upperTrunc = Inf,
method = "numeric",
relativeTolerance = 0.05,
...
)
rposnorm90ci(
n,
lower,
median = mean(c(lower, upper)),
upper,
method = "numeric",
relativeTolerance = 0.05,
...
)
rtnorm_0_1_90ci(
n,
lower,
median = mean(c(lower, upper)),
upper,
method = "numeric",
relativeTolerance = 0.05,
...
)
Arguments
n |
Number of generated observations. |
ci |
|
median |
if |
lowerTrunc |
|
upperTrunc |
|
method |
method used to determine the parameters of the truncated normal; possible methods
are |
relativeTolerance |
|
... |
further parameters to be passed to |
lower |
|
upper |
|
Details
method="numeric"
is implemented by paramtnormci_numeric
and
method="fit"
by paramtnormci_fit
.
Positive normal random number generation: a positive normal distribution
is a truncated normal distribution with lower truncation point equal to zero and upper truncation
is infinity. rposnorm90ci
implements this as a wrapper function for
rtnorm90ci(n, c(lower,upper), median, lowerTrunc=0, upperTrunc=Inf, method, relativeTolerance,...)
.
0-1-(truncated) normal random number generation: a 0-1-normal distribution
is a truncated normal distribution with lower truncation point equal to zero and upper truncation
equal to 1. rtnorm_0_1_90ci
implements this as a wrapper function for
rtnorm90ci(n, c(lower,upper), median, lowerTrunc=0, upperTrunc=1, method, relativeTolerance,...)
.
See Also
For the implementation of method="numeric"
: paramtnormci_numeric
;
for the implementation of method="fit"
: paramtnormci_fit
.