Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lnNpr

Calculate log of Gaussian distribution function accurately


Description

This function returns the probability of a standard Gaussian variate between the interval a and b, avoiding numerical overflow. The function is vectorized and is meant to be used only internally by the package TruncatedNormal.

Usage

lnNpr(a, b, check = TRUE)

Arguments

a

vector of lower bound

b

vector of upper bound

check

logical; should checks be performed?

Value

a vector of log probability.


TruncatedNormal

Truncated Multivariate Normal and Student Distributions

v2.2
GPL-3
Authors
Zdravko Botev [aut] (<https://orcid.org/0000-0001-9054-3452>), Leo Belzile [aut, cre] (<https://orcid.org/0000-0002-9135-014X>)
Initial release
2020-05-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.