odds_to_probs: Convert odds to probabilities

Description Usage Arguments Value Examples

View source: R/logitfunctions.R

Description

This is the inverse of the function that calculates odds from probabilities. For any given value of odds, the corresponding probability p where odds = p/(1-p) is returned.

Usage

1

Arguments

odds

A numeric vector of non-negative values, representing odds.

Value

A numeric vector of probabilities.

Examples

1
2
odds <- c(1, 3, 9)
odds_to_probs(odds)

mark-andrews/rdemopkg documentation built on Dec. 21, 2021, 2:46 p.m.