Description Usage Arguments Details Value References Examples
boxcox.r finds the maximum likelihood estimates of the parameters of the Box–Cox transform and the coefficients on the independent variables.It can fit theta models, lambda models, and models where all but some group of independent variables are not transformed.
1 2 |
formula |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under ‘Details’. |
data |
an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which boxcox.r is called. |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The ‘factory-fresh’ default is na.omit. Another possible value is NULL, no action. Value na.exclude can be useful. |
noTrans |
a set of independet variables which are not going to be transformed. |
optimize.bounds |
bounds for lambda and theta optimization |
model |
one of the following models: theta, lambda, lhs, rhs |
test.params |
a pair of c(theta, lambda) parameters. If test.params are passed, no optimization is performed. |
... |
additional arguments to be passed to the low level regression fitting functions (see below). |
The following models could be fitted:
Theta: Different parameters for box-cox transformation are used for independent and dependent variables.
Lambda: the same parameter is used for box-cox transformation of independent and dependent variables.
lhs: only left side of 'formula' is transformed.
rhs: only right side of 'formula' is transformed.
coefficients |
a named vector of coefficients |
Box, G. E. P., and D. R. Cox. 1964. An analysis of transformations. Journal of the Royal Statistical Society, Series B 26: 211 - 252.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.