probs2logits: Conversion of Probabilities into Logits

Description Usage Arguments Value Examples

View source: R/probs2logits.R

Description

Converts probabilities into logits

Usage

1
2
3

Arguments

probs

Vector containing probabilities

y

Vector containing logits

Value

A vector with logits or probabilities

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#############################################################################
# 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)

alexanderrobitzsch/immer documentation built on Aug. 16, 2020, 10:11 p.m.