Learn R Programming

qra (version 0.2.7)

fpower: Folded Power Transformation

Description

The name “folded Power Transformation” is used because this does for power transformations what Tukey's folded logarithm does for the logarithmic tranformation. The function calculates $$f(p, \lambda, \epsilon) = \frac{p+\epsilon}{1-p+\epsilon}^\lambda$$ where \(\lambda\) is the power and \(\epsilon\) is a positive offset that ensures that \(\frac{p+\epsilon}{1-p+\epsilon}\) is greater than 0 and finite.

Usage

fpower(p, lambda, eps)

Arguments

p

Mortality proportion

lambda

Power lambda for the power transformation

eps

If eps>0 phat is replaced by \(\frac{p+\epsilon}{1+\epsilon}\) before applying the power transformation.

Value

The transformed values of fpower(p).

Examples

Run this code
# NOT RUN {
p <- (0:10)/10
ytrans <- fpower(p, lambda=0.25, eps=1/450)
# }

Run the code above in your browser using DataLab