Skip to contents

Converts probabilities into logits

Usage

probs2logits(probs)

logits2probs(y)

Arguments

probs

Vector containing probabilities

y

Vector containing logits

Value

A vector with logits or probabilities

Examples

#############################################################################
# EXAMPLE 1: Probability-logit-conversions: a toy example
#############################################################################

# define vector of probabilities
probs <- c( .3, .25, .25, .2)
sum(probs)

# convert probabilities into logits
y <- immer::probs2logits( probs )
# retransform logits into probabilities
immer::logits2probs(y)