# boxcox

0th

Percentile

##### Box-Cox Transformations for Linear Models

Computes and optionally plots profile log-likelihoods for the parameter of the Box-Cox power transformation.

Keywords
models, hplot, regression
##### Usage
boxcox(object, ...)## S3 method for class 'default':
boxcox(object, lambda = seq(-2, 2, 1/10), plotit = TRUE,
interp, eps = 1/50, xlab = expression(lambda),
ylab = "log-Likelihood", ...)## S3 method for class 'formula':
boxcox(object, lambda = seq(-2, 2, 1/10), plotit = TRUE,
interp, eps = 1/50, xlab = expression(lambda),
ylab = "log-Likelihood", ...)## S3 method for class 'lm':
boxcox(object, lambda = seq(-2, 2, 1/10), plotit = TRUE,
interp, eps = 1/50, xlab = expression(lambda),
ylab = "log-Likelihood", ...)
##### Arguments
object
a formula or fitted model object. Currently only lm and aov objects are handled.
lambda
vector of values of lambda -- default $(-2, 2)$ in steps of 0.1.
plotit
logical which controls whether the result should be plotted.
interp
logical which controls whether spline interpolation is used. Default to TRUE if plotting with lambda of length less than 100.
eps
Tolerance for lambda = 0; defaults to 0.02.
xlab
defaults to "lambda".
ylab
defaults to "log-Likelihood".
...
additional parameters to be used in the model fitting.
##### Value

• A list of the lambda vector and the computed profile log-likelihood vector, invisibly if the result is plotted.

##### Side Effects

If plotit = TRUE plots loglik vs lambda and indicates a 95% confidence interval about the maximum observed value of lambda. If interp = TRUE, spline interpolation is used to give a smoother plot.

##### References

Box, G. E. P. and Cox, D. R. (1964) An analysis of transformations (with discussion). Journal of the Royal Statistical Society B, 26, 211--252. Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.

##### Aliases
• boxcox
• boxcox.default
• boxcox.formula
• boxcox.lm
##### Examples
boxcox(Volume ~ log(Height) + log(Girth), data = trees,
lambda = seq(-0.25, 0.25, length = 10))

boxcox(Days+1 ~ Eth*Sex*Age*Lrn, data = quine,
lambda = seq(-0.05, 0.45, len = 20))
Documentation reproduced from package MASS, version 7.3-0, License: GPL-2 | GPL-3

### Community examples

Looks like there are no examples yet.
{"ft_lang_label":"__label__en","ft_lang_prob":0.56648916,"math_prob":0.96121544,"size":2069,"snap":"2019-13-2019-22","text_gpt3_token_len":606,"char_repetition_ratio":0.11767554,"word_repetition_ratio":0.17910448,"special_character_ratio":0.31416142,"punctuation_ratio":0.2375297,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9929254,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-03-25T23:59:14Z\",\"WARC-Record-ID\":\"<urn:uuid:5c6940d7-1d4e-4f78-925b-c630af3d91c7>\",\"Content-Length\":\"15613\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d1f7c052-db07-43ab-9dfc-5163d2214b46>\",\"WARC-Concurrent-To\":\"<urn:uuid:54c9bf57-0d0b-426a-a665-facad4e8b944>\",\"WARC-IP-Address\":\"54.173.200.236\",\"WARC-Target-URI\":\"https://www.rdocumentation.org/packages/MASS/versions/7.3-0/topics/boxcox\",\"WARC-Payload-Digest\":\"sha1:PTIVXYAXB44R6X6BMJAPZV3Q5QOFS6DZ\",\"WARC-Block-Digest\":\"sha1:ZUG453KEIBVBTTHFEOXFLQ74PV3MTBO7\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-13/CC-MAIN-2019-13_segments_1552912204736.6_warc_CC-MAIN-20190325234449-20190326020449-00411.warc.gz\"}"}