logsumexp: Calculate the log-sum-exponential (LSE) of a vector

View source: R/utilities.R

logsumexpR Documentation

Calculate the log-sum-exponential (LSE) of a vector

Description

Calculate the exponent of a vector (offset by the max), sum the elements, calculate the log, remove the offset.

Usage

logsumexp(x)

Arguments

x

numeric vector

Value

The LSE.

Examples

  logsumexp(1:10)


LDATS documentation built on Sept. 19, 2023, 5:08 p.m.