logsum {aphid}R Documentation

Sum of logged probabilities.

Description

"logsum" takes a vector of logged probabilities (neagtive values) and returns its sum.

Usage

logsum(x)

Arguments

x

a numeric vector of logged probabilities.

Details

This is a simple compiled function that exponentiates the values in the input vector, finds their sum, and returns the log of that value.

Value

returns a single numeric value representing the logged sum of the values in the input vector.

Author(s)

Shaun Wilkinson


[Package aphid version 1.3.3 Index]