computeTruncatedNormalPdf {rotRPackage} | R Documentation |
This ROT function, called from a Distribution C++ object, is given a point and the necessary distribution parameters. It then computes the Pdf at the point.
computeTruncatedNormalPdf(point, mu, sigma, a, b)
point |
Point(s) where the Pdf is computed. (vector) |
mu |
The TruncatedNormal distribution mu. |
sigma |
The TruncatedNormal distribution sigma. |
a |
The TruncatedNormal distribution aParameter. |
b |
The TruncatedNormal distribution bParameter. |
The truncated normal distribution has the following density function: $$f(x, mu, sigma, a, b) = 1[a, b](x) * (1 / sigma) * phi((x - mu) / sigma) / (phi((b - mu) / sigma) - phi((a - mu) / sigma))$$
The TruncatedNormal Pdf value (vector)
Pierre-Matthieu Pair, Softia for EDF.
# Standard TruncatedNormal distribution example. point <- runif(1000) * 14 - 6 plot(point, computeTruncatedNormalPdf(point, 1, 2, - 2, 6))