odds: Odds of a success

Description Usage Arguments Value References Examples

View source: R/odds.R

Description

This function calculates the odds of a success from its probability. For more details, see Agresti (2018, ISBN: 978-1-119-40528-3).

Usage

1
odds(p,name="Prevalence")

Arguments

p

a numeric value indicating the probability of the success. It is possible to consider a numeric vector of different probabilities values.

name

a character value indicating the name of the success. Possible values for this argument are name="Prevalence" or name="Incidence".

Value

A matrix of two columns. The first column contains the vector of probabilities p. The second column contains the corresponding odds values.

References

Agresti, A. (2018). An introduction to categorical data analysis. John Wiley & Sons. ISBN: 978-1-119-40528-3.

Examples

1
odds(0.09, name="Prevalence")

BioProbability documentation built on Jan. 25, 2020, 1:06 a.m.