LogPq {SALTSampler}R Documentation

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

Description

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

Usage

LogPq(x)

Arguments

x

Logit(p)Logit(p) where pp 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]