DescTools (version 0.99.8.1)

LogLin: Log Linear Hybrid, Generalized Log

Description

Computes the log linear hybrid transformation, resp. generalized log, with the goal to stabilize the variance.

Usage

LogLin(x, a)
LogGen(x, a)

Arguments

x
a numeric vector, matrix or data frame.
a
cutoff for the linear part of the transformation

Value

  • a numeric vector of the same dimensions as x containing the transformed results.

Details

The log linear hybrid transformation function is linear for x <= a="" and="" logarithmic="" for="" x=""> a. It is continuously differentiable. The generalized log and log-linear hybrid transformations were introduced in then context of gen-expression microarray data by Rocke and Durbin (2003). The function LogLin is currently defined as: function (x, a) {\cr x[x<=a] <-="" x[x<="a]" a="" +="" log(a)="" -="" 1\cr="" x[x="">a] <- log(x[x>a])\cr return(x)\cr } and LogGen as: function (x, a) {\cr return(log((x + sqrt(x^2 + a^2)) / 2)) }

References

Rocke DM, Durbin B (2003): Approximate variance-stabilizing transformations for gene-expression microarray data, Bioinformatics. 22;19(8):966-72.

See Also

log

Examples

Run this code
x <- seq(-10, 50, 0.1 )

plot( LogLin(x, a=5) ~ x, type="l" )
grid()
lines( LogLin(x, a=2) ~ x, col="brown" )
lines( LogLin(x, a=0.5) ~ x, col="steelblue" )

lines( LogGen(x, a=1) ~ x, col="orange" )

Run the code above in your browser using DataLab