The Box-Cox family of scaled power transformations
equals \(((U + \gamma)^{\lambda}-1)/\lambda\)
for \(\lambda \neq 0\), and
\(\log(U)\) if \(\lambda =0\). If \(\gamma\) is not specified, it is set equal to zero. U + gamma
must be strictly positive to use this family.
If family="yeo.johnson"
then the Yeo-Johnson transformations are used.
This is the Box-Cox transformation of \(U+1\) for nonnegative values,
and of \(|U|+1\) with parameter \(2-\lambda\) for \(U\) negative. An alternative family to the Yeo-Johnson family is the skewPower
family that requires estimating both a power and an second parameter.
The basic power transformation returns \(U^{\lambda}\) if \(\lambda\)
is not zero, and \(\log(\lambda)\) otherwise.
If jacobian.adjusted
is TRUE
, then the scaled transformations are divided by the
Jacobian, which is a function of the geometric mean of \(U\) for skewPower and yjpower and of \(U + gamma\) for bcPower. With this adjustment, the Jacobian of the transformation is always equal to 1.
Missing values are permitted, and return NA
where ever U
is equal to NA
.