boxcox function in the boxCox(object, ...)
## S3 method for class 'default':
boxCox(object, lambda = seq(-2, 2, 1/10), plotit = TRUE,
interp = (plotit && (m < 100)), eps = 1/50,
xlab = expression(lambda),
ylab = "log-Likelihood", family="bcPower", grid=TRUE, ...)
## S3 method for class 'formula':
boxCox(object, lambda = seq(-2, 2, 1/10), plotit = TRUE,
interp = (plotit && (m < 100)), eps = 1/50,
xlab = expression(lambda),
ylab = "log-Likelihood", family="bcPower", ...)
## S3 method for class 'lm':
boxCox(object, lambda = seq(-2, 2, 1/10), plotit = TRUE,
interp = (plotit && (m < 100)), eps = 1/50,
xlab = expression(lambda),
ylab = "log-Likelihood", family="bcPower", ...)lm and aov objects are handled.TRUE.TRUE if plotting with lambda of length less than 100."lambda"."log-Likelihood"."bcPower" for the Box-Cox power family of
transformations. If set to "yjPower" the Yeo-Johnson family, which
permits negative responses, is used.plotit=TRUE plots log-likelihood vs
lambda and indicates a 95lambda. If interp=TRUE, spline interpolation is used to give a smoother plot.boxcox function in the
family and grid are
identical, and if the arguments
family = "bcPower", grid=FALSE is set it gives an identical graph. If
family = "yjPower" then the Yeo-Johnson power transformations, which
allow nonpositive responses, will be used.boxcox, yjPower, bcPower,
powerTransformboxCox(Volume ~ log(Height) + log(Girth), data = trees,
lambda = seq(-0.25, 0.25, length = 10))
data("quine", package = "MASS")
boxCox(Days ~ Eth*Sex*Age*Lrn, data = quine,
lambda = seq(-0.05, 0.45, len = 20), family="yjPower")Run the code above in your browser using DataLab