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

Description Usage Arguments Value Examples

View source: R/foldp.R

Description

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

Usage

1
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

1
foldp(c(0.2,0.75), 0)

qra documentation built on Oct. 29, 2021, 9:06 a.m.