# estimateTransform

##### Finding Univariate or Multivariate Power Transformations

`estimateTransform`

computes members of families of transformations
indexed by one
parameter, the Box-Cox power family, or the Yeo and Johnson (2000) family, or
the
basic power family, interpreting zero power as logarithmic.
The family can be modified to have Jacobian one, or not, except for the basic
power family. Most users will use the function `powerTransform`

, which
is a front-end for this function.

- Keywords
- regression

##### Usage

```
estimateTransform(X, Y, weights=NULL, family="bcPower", start=NULL,
method="L-BFGS-B", ...)
```

##### Arguments

- X
- A matrix or data.frame giving the
right-side variables . - Y
- A vector or matrix or data.frame giving the
left-side variables. - weights
- Weights as in
`lm`

. - family
- The transformation family to use. This is the quoted name of a
function for computing the transformed values. The default is
`bcPower`

for the Box-Cox power family and the most likely alternative is`yjPower`

for the Yeo- - start
- Starting values for the computations. It is usually adequate to leave this at its default value of NULL.
- method
- The computing alogrithm used by
`optim`

for the maximization. The default`"L-BFGS-B"`

appears to work well. - ...
- Additional arguments that are passed to the
`optim`

function that does the maximization. Needed only if there are convergence problems.

##### Details

See the documentation for the function `powerTransform`

.

##### Value

- An object of class
`powerTransform`

with components value The value of the loglikelihood at the mle. counts See `optim`

.convergence See `optim`

.message See `optim`

.hessian The hessian matrix. start Starting values for the computations. lambda The ml estimate roundlam Convenient rounded values for the estimates. These rounded values will often be the desirable transformations. family The transformation family xqr QR decomposition of the predictor matrix. y The responses to be transformed x The predictors weights The weights if weighted least squares.

##### References

Box, G. E. P. and Cox, D. R. (1964) An analysis of transformations. *Journal
of the Royal Statisistical Society, Series B*. 26 211-46.
Cook, R. D. and Weisberg, S. (1999) *Applied Regression Including Computing
and Graphics*. Wiley.
Fox, J. and Weisberg, S. (2011)
*An R Companion to Applied Regression*, Second Edition, Sage.
Velilla, S. (1993) A note on the multivariate Box-Cox transformation to
normality. *Statistics and Probability Letters*, 17, 259-263.
Weisberg, S. (2005) *Applied Linear Regression*, Third Edition. Wiley.
Yeo, I. and Johnson, R. (2000) A new family of
power transformations to improve normality or symmetry.
*Biometrika*, 87, 954-959.

##### See Also

##### Examples

```
data(trees,package="MASS")
summary(out1 <- powerTransform(Volume~log(Height)+log(Girth),trees))
# multivariate transformation:
summary(out2 <- powerTransform(cbind(Volume,Height,Girth)~1,trees))
testTransform(out2,c(0,1,0))
# same transformations, but use lm objects
m1 <- lm(Volume~log(Height)+log(Girth),trees)
(out3 <- powerTransform(m1))
# update the lm model with the transformed response
update(m1,basicPower(out3$y,out3$roundlam)~.)
```

*Documentation reproduced from package car, version 2.0-13, License: GPL (>= 2)*