serrsBayes (version 0.4-0)

sumDlogNorm: Sum log-likelihoods of i.i.d. lognormal.

Description

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

Usage

sumDlogNorm(x, meanlog, sdlog)

Arguments

x

Vector of i.i.d. lognormal random varibles

meanlog

mean of the distribution on the log scale

sdlog

standard deviation on the log scale

Value

log-likelihood of x

Details

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

See Also

sum(dlnorm(x, meanlog, sdlog, log=TRUE))

Examples

Run this code
# NOT RUN {
x <- rlnorm(100)
sumDlogNorm(x,0,1)
# }

Run the code above in your browser using DataCamp Workspace