Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

boxTidwell

Box-Tidwell Transformations


Description

Computes the Box-Tidwell power transformations of the predictors in a linear model.

Usage

boxTidwell(y, ...)

## S3 method for class 'formula'
boxTidwell(formula, other.x=NULL, data=NULL, subset, 
  na.action=getOption("na.action"), verbose=FALSE, tol=0.001, 
  max.iter=25, ...)

## Default S3 method:
boxTidwell(y, x1, x2=NULL, max.iter=25, tol=0.001, 
  verbose=FALSE, ...)
  
## S3 method for class 'boxTidwell'
print(x, digits=getOption("digits") - 2, ...)

Arguments

formula

two-sided formula, the right-hand-side of which gives the predictors to be transformed.

other.x

one-sided formula giving the predictors that are not candidates for transformation, including (e.g.) factors.

data

an optional data frame containing the variables in the model. By default the variables are taken from the environment from which boxTidwell is called.

subset

an optional vector specifying a subset of observations to be used.

na.action

a function that indicates what should happen when the data contain NAs. The default is set by the na.action setting of options.

verbose

if TRUE a record of iterations is printed; default is FALSE.

tol

if the maximum relative change in coefficients is less than tol then convergence is declared.

max.iter

maximum number of iterations.

y

response variable.

x1

matrix of predictors to transform.

x2

matrix of predictors that are not candidates for transformation.

...

not for the user.

x

boxTidwell object.

digits

number of digits for rounding.

Details

The maximum-likelihood estimates of the transformation parameters are computed by Box and Tidwell's (1962) method, which is usually more efficient than using a general nonlinear least-squares routine for this problem. Score tests for the transformations are also reported.

Value

an object of class boxTidwell, which is normally just printed.

Author(s)

References

Box, G. E. P. and Tidwell, P. W. (1962) Transformation of the independent variables. Technometrics 4, 531-550.

Fox, J. (2016) Applied Regression Analysis and Generalized Linear Models, Third Edition. Sage.

Fox, J. and Weisberg, S. (2019) An R Companion to Applied Regression, Third Edition, Sage.

Examples

boxTidwell(prestige ~ income + education, ~ type + poly(women, 2), data=Prestige)

car

Companion to Applied Regression

v3.0-10
GPL (>= 2)
Authors
John Fox [aut, cre], Sanford Weisberg [aut], Brad Price [aut], Daniel Adler [ctb], Douglas Bates [ctb], Gabriel Baud-Bovy [ctb], Ben Bolker [ctb], Steve Ellison [ctb], David Firth [ctb], Michael Friendly [ctb], Gregor Gorjanc [ctb], Spencer Graves [ctb], Richard Heiberger [ctb], Pavel Krivitsky [ctb], Rafael Laboissiere [ctb], Martin Maechler [ctb], Georges Monette [ctb], Duncan Murdoch [ctb], Henric Nilsson [ctb], Derek Ogle [ctb], Brian Ripley [ctb], William Venables [ctb], Steve Walker [ctb], David Winsemius [ctb], Achim Zeileis [ctb], R-Core [ctb]
Initial release
2020-09-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.