computeTruncatedNormalPdf {rotRPackage}R Documentation

Compute the Pdf of a TruncatedNormal Distribution

Description

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.

Usage

computeTruncatedNormalPdf(point, mu, sigma, a, b)

Arguments

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.

Details

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))$$

Value

The TruncatedNormal Pdf value (vector)

Author(s)

Pierre-Matthieu Pair, Softia for EDF.

Examples

# Standard TruncatedNormal distribution example. 

point <- runif(1000) * 14 - 6
plot(point, computeTruncatedNormalPdf(point, 1, 2, - 2, 6))

[Package rotRPackage version 1.4.3 Index]