boxcox
function in the boxCox(object, ...)
## S3 method for class 'default':
boxCox(object,
lambda = seq(-2, 2, 1/10), plotit = TRUE,
interp = plotit, eps = 1/50,
xlab=NULL, ylab=NULL,
family="bcPower",
param=c("lambda", "gamma"), gamma=NULL,
grid=TRUE, ...)
## S3 method for class 'formula':
boxCox(object, lambda = seq(-2, 2, 1/10), plotit = TRUE, ...)
## S3 method for class 'lm':
boxCox(object, lambda = seq(-2, 2, 1/10), plotit = TRUE, ...)
lm
or aov
.TRUE
.TRUE
if plotting with lambda of length less than 100."lambda"
or "gamma"
."log-Likelihood"
or for skewPower family to the appropriate label."bcPower"
for the Box-Cox power family of
transformations. If set to "yjPower"
the Yeo-Johnson family, which
permits negative responses, is used. If set to skewPower
the function gives the profamily="skewPower"
, produces a profile log-likelihood for the parameter selected, maximizing over the remaining parameter.family="skewPower", param="gamma"
. If this is a vector of positive values, then the profile log-likelihood for the location (or start) parameter in the skew power family is evaluated at these values of gamma. If gamma is plot
.plotit=TRUE
plots log-likelihood vs
lambda and indicates a 95 lambda. If interp=TRUE
, spline interpolation is used to give a smoother plot.boxcox
function in the
boxcox
, and if the argument family="bcPower"
is used, the result is essentially identical to the function in yjPower
and skewPower
families that allow a few values of the response to be non-positive.
The skew power family has two parameters a power $\lambda$ and a start or location parameter $\gamma$, and this functin can be used to obtain a profile log-likelihood for either parameter.boxcox
, yjPower
, bcPower
, skewPower
,
powerTransform
boxCox(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