The Box-Cox transformation, which requires a strictly positive
variable, can be used to rescale a variable to be more similar to a
normal distribution. In this package, the partial log-likelihood function
is directly optimized within a reasonable set of transformation values
(which can be changed by the user).
This transformation is typically done on the outcome variable using the
residuals for a statistical model (such as ordinary least squares).
Here, a simple null model (intercept only) is used to apply the
transformation to the predictor variables individually. This can
have the effect of making the variable distributions more symmetric.
If the transformation parameters are estimated to be very closed to the
bounds, or if the optimization fails, a value of NA
is used and
no transformation is applied.