Learn R Programming

qra (version 0.2.7)

foldp: Title Function to calculate ratio of p+eps to 1-p+eps.

Description

This is a convenience function that returns \(\frac{p+\epsilon}{1-p+\epsilon}\). It calculates the argument that is supplied to the log function in Tukey's ‘flog’.

Usage

foldp(p, eps)

Arguments

p

Proportion

eps

Offset. The choice eps=0.01 has the same effect as replacing \(\frac{r}{n-r}\) by \(\frac{r+0.5}{n-r+0.5}\) when \(n=50\), or by \(\frac{r+1}{n-r+1}\) when \(n=100\)

Value

(p+eps)/(1-p+eps)

Examples

Run this code
# NOT RUN {
foldp(c(0.2,0.75), 0)
# }

Run the code above in your browser using DataLab