pow: Power Transforms

View source: R/pow.R

powR Documentation

Power Transforms

Description

Raises censored data to a positive power.

Usage

pow(x, lambda, out = "Auto")

Arguments

x

any object that can be converted to class "mcens" or "lcens." Must be non negative (zero data are permitted). Missing values are permitted and missing vlues in the returnned vector.

lambda

the power to raise x. Must be strictly positive.

out

the output format, must be one of "numeric," "lcens," "mcens," or "Auto." If "Auto," then if x is class "numeric," then the output format is "numeric" otherwise the output format is "mcens."

Value

An object of class "mcens" that is the result of the requested operations. Each of the range of the lower and upper values are raised to the power of lambda and the result divided by lambda to approximately maintain scale. But the reciprocal value of lambda cannot be used to restore the original values.

Examples

pow(as.mcens(c(0,2), c(1,2)), 2)
pow(as.mcens(c(0,2), c(1,2)), .5)
# Numeric values
pow(c(1,3), 2)

USGS-R/smwrQW documentation built on Oct. 11, 2022, 6:13 a.m.