Performs Box-Cox power transformation of the data. The optimal value of power parameter is selected based on profile log-likelihoods.
The function is called by KRDetect.outliers.changepoint
and is not intended for use by regular users of the package.
boxcoxTransform(x)
a numeric vector of data values.
A list is returned with elements:
a numeric value giving power parameter
a numeric vector of data values
a numeric vector of transformed data
This function computes the Box-Cox power transformation of the data.
The function is exported for developer use only. It does not perform any checks on inputs since it is only a convenience function for a transformation of data to normality.
The optimal value of a power parameter is estimated based on profile log-likelihoods calculated using boxcox
function implemented in MASS package.
Box G, Cox D (1964). An analysis of transformations. Journal of the Royal Statistical Society: Series B, 26, 211<U+2013>234.
Venables WN, Ripley BD (2002). Modern Applied Statistics with S. New York, fourth edition. ISBN 0-387-95457-0, URL http://www.stats.ox.ac.uk/pub/MASS4.