tran.family.box.cox {alr3} | R Documentation |
These are internal functions that compute families of transformations. The user
accesses these functions using powtran
.
## S3 method for class 'box.cox' tran.family(U, lambda, modified = TRUE) ## S3 method for class 'yeo.johnson' tran.family(U,lambda,modified=TRUE) ## S3 method for class 'power' tran.family(U,lambda,modified=FALSE)
U |
The variable to be transformed. Missing values are permitted. U must
be strictly positive unless |
lambda |
The transformation parameter, typically a value between -2 and 2. |
modified |
TRUE to divide by the Jacobian, as need to transform the response, FALSE for no division. |
Uses either the Box-Cox power family, the Yeo-Johnson generalization of this family for non-strictly-positive variables, or basic power transformations.
You can add additional families by writing a function tran.family.myfamily
with the same arguments as tran.family.box.cox
, and then set
family="myfamily"
in the call to powtran
.
tran.family.YJ
is an alias for tran.family.yeo.johnson
.
tran.family.boxcox
is an alias for tran.family.box.cox
.
tran.family.basic
is an alias for tran.family.power
.
Returns a vector of the same length as U with the transformed values.
Sanford Weisberg, sandy@stat.umn.edu
Weisberg, S. (2005). Applied Linear Regression, third edition. New York: Wiley, Chapter 7.
Yeo, In-Kwon and Johnson, Richard (2000). A new family of power transformations to improve normality or symmetry. Biometrika, 87, 954-959.
data(ufcwc) attach(ufcwc) powtran(Height,lambda=0)