sumDnorm: Sum log-likelihoods of Gaussian.

Description Usage Arguments Details Value See Also Examples

View source: R/RcppExports.R

Description

This is an internal function that is only exposed on the public API for unit testing purposes.

Usage

1

Arguments

x

Vector of i.i.d. Gaussian random varibles

mean

Vector of means

sd

Vector of standard deviations

Details

The sum of the log-likelihoods (log of the product of the likelihoods) for independent, identically-distributed, Gaussian random variables. Note: this Rcpp function is thread-safe, unlike the equivalent alternatives.

Value

log-likelihood of x

See Also

sum(dnorm(x, mean, sd, log=TRUE))

Examples

1
2
3
4
  x <- rnorm(100)
  mu <- rep(0,length(x))
  sd <- rep(1,length(x))
  sumDnorm(x,mu,sd)

mooresm/serrsBayes documentation built on July 2, 2021, 7:36 a.m.