Description Usage Arguments Details Value Examples
Distribution function and random generation for the center (between a lower and an upper bound) of the normal distribution with mean equal to mu and standard deviation equal to sigma.
1 2 3 |
a |
lower bound |
b |
upper bound |
mu |
mean parameter |
sigma |
standard deviation |
log.p |
Logical argument. If |
Diff |
Logical argument. If |
n |
number of draws to generate. If |
lgrt |
log of the distribution function between the lower bound and infinity |
lglt |
log of the distribution function between negative infinity and the upper bound |
The distribution function pnorm_ct finds the probability of the center of a normal density (the probability of the area between a lower bound a and an upper bound b) while the random number generator rnorm_ct samples from a restricted normal density where lgrt is the log of the distribution between the lower bound and infinity and lglt is the log of the distribution function between negative infinity and the upper bound. The sum of the exponentiated values for the two (exp(lgrt)+exp(lglt)) must sum to more than 1.
These functions are mainly used to handle cases where the differences
between the upper and lower bounds b-a
are small. In such cases,
using pnorm(b)-pnorm(a)
may result in 0 being returned even when the
difference is supposed to be positive.
For pnorm_ct
, vector of length equal to length of a
and for
rnorm_ct
, a vector with length determined by n
containing draws from
the center of the normal distribution.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.