Description Usage Arguments Details Note Author(s) References Examples
This function takes a variable as input, computes the optimal lambda using a boxcox transformation, then returnes a transformed version of the variable.
1 |
x |
a numerical vector |
minval |
before a transformation is performed, the variables must often be positive. This tells R what the minimum value should be. Defaults to .01. |
lam |
Should the lambda value be returned? |
... |
additional parameters to be used in the model fitting. |
The MASS
package has a function that computes the optimal lambda value for a particular regression equation. However, it currently (as of version 7.3-23)
returns a lambda vector rather than the boxcox transformed variable. This function is a wrapper for boxcox
that actually returns a vector that is a
transformed version of the original variable.
This function calls the boxcox function in the MASS package. To avoid loading the package, I have branched the function directly into the fifer package.
Dustin Fife fife.dustin@gmail.com.
Venables, W. N. & Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth Edition. Springer, New York. ISBN 0-387-95457-0
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.