probs2logits: Conversion of Probabilities into Logits

View source: R/probs2logits.R

probs2logitsR Documentation

Conversion of Probabilities into Logits

Description

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)

immer documentation built on May 29, 2024, 11:52 a.m.