Skip to contents

Calculate the log-likelihood or density for a robust normal distribution.

Usage

drobust(x, mu, sigma, log = FALSE)

Arguments

x

a numeric vector of observed values.

mu

a numeric vector of mean values.

sigma

a numeric vector of standard deviation values.

log

a logical indicating whether to return log-likelihood (TRUE) or density (FALSE).

Value

a numeric vector of (log-)likelihoods.

Examples

drobust(x = 5, mu = 4, sigma = 0.9, log = TRUE)
#> [1] -0.4935543