| hyperbolic | R Documentation |
Functions for transforming and back-transforming data using a hyperbolic function.
hyperbolic(x, factor = 0, scale = mean(x, na.rm = TRUE)) Ihyperbolic(x, factor = 0, scale)
x |
a numeric vector to be transformed by |
factor |
the hyperbolic adjustment term in the hyperbolic equation. |
scale |
the scaling factor for the data. |
If x contains missing values, then scale is computed after
omitting the missing values and the output vector has a missing value
wherever x has a missing value.
The basic equation for the hyberbolic transform is 1/(1 + (10^factor * x)/
scale). The basic equation is adjusted to produce fairly consistent values for small changes
in factor and increase for increasing values in x.
The function hyperbolic computes the forward transform and the
function Ihyperbolic computes the inverse [hyperbolic] transform, or back-transform.
A numeric vector of the transformed or back-transformed values in
x with an attribute "scale" of the values used for scale. The range
of the values returned from hyperbolic is between 0 and 2 times scale.
The original hyperbolic transform used a linear factor. The version in
these functions uses the common log of the factor to make the factors easier
to use.
When used with the default value for scale, factor values
outside the range of +/- 3 have very little effect on the transform.
The use of a variable hyperbolic transform to help model the relations between stream water chemistry and flow was first described in:
Johnson, N.M., Likens, G.E., Borman, F.H., Fisher, D.W., and Pierce, R.S., 1969, A working model for the variation in stream water chemistry at the Hubbard Brook Experimental Forest, New Hampshire: Water Resources Research, v. 5, no. 6, p. 1353–1363.
boxCox
X.test <- c(1,4,9,16,25,36,49) hyperbolic(X.test) # accept the defaults hyperbolic(X.test, factor=1) hyperbolic(X.test, factor=-1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.