Skip to contents

The density of the normal distribution, used as the prior of the EAP estimate. It returns the same result as stats::dnorm().

Usage

density_function(x, mean = 0, sd = 1)

Arguments

x

Numeric vector of values at which the density is evaluated.

mean

Mean of the distribution.

sd

Standard deviation of the distribution.

Value

A numeric vector of densities.

Examples

v <- seq(-3, 3, by = 0.1)
all.equal(density_function(v), dnorm(v))
#> [1] TRUE