LogitSum: Log of the Sum of Probabilities

Description Usage Arguments Examples

Description

For x=logit(p), this function returns s = log(∑ p) where the sum of p is less than or equal to 1. Calculations are designed to preserve accuracy even for values numerically near 0 or 1.

Usage

1

Arguments

x

A vector of probabilites whose sum is less than or equal to 1

Examples

1
2
3
4
5
#Find logit sum for a single value
LogitSum(x = 0.1)

#Find logit sum for a vector of values
LogitSum(x = c(0.1, 0.4, 0.2))

Example output

Loading required package: lattice
[1] -0.6443967
[1] 0.5149177

SALTSampler documentation built on May 2, 2019, 11:27 a.m.