LogPq {SALTSampler}R Documentation

Computes log(p) and log(1-p)

Description

For x = logit(p), this function returns log(p) and log(1-p). Special care is taken to ensure accuracy when coordinates are numerically close to 0 or 1.

Usage

LogPq(x)

Arguments

x

Logit(p) where p is a vector of probabilites

Examples

#Find log(p) and log(q) for x = logit(0.2)
a <- log(0.2/(1 - 0.2))
LogPq(x = a)

#Find log(p) and log(q) for x = logit(1e-4)
b <- log(1e-4/(1 - 1e-4))
LogPq(x = b)

[Package SALTSampler version 1.1.0 Index]