⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 boxcox.html

📁 本程序是基于linux系统下c++代码
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Box-Cox Transformations for Linear Models</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>

<table width="100%" summary="page for boxcox {MASS}"><tr><td>boxcox {MASS}</td><td align="right">R Documentation</td></tr></table>
<h2>Box-Cox Transformations for Linear Models</h2>


<h3>Description</h3>

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


<h3>Usage</h3>

<pre>
boxcox(object, ...)

## Default S3 method:
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", ...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
a formula or fitted model object.  Currently only <code>lm</code> and
<code>aov</code> objects are handled.</td></tr>
<tr valign="top"><td><code>lambda</code></td>
<td>
vector of values of <code>lambda</code>
&ndash; default <i>(-2, 2)</i> in steps of 0.1.</td></tr>
<tr valign="top"><td><code>plotit</code></td>
<td>
logical which controls whether the result should be plotted.</td></tr>
<tr valign="top"><td><code>interp</code></td>
<td>
logical which controls whether spline interpolation is
used. Default to <code>TRUE</code> if plotting with <code>lambda</code> of
length less than 100.</td></tr>
<tr valign="top"><td><code>eps</code></td>
<td>
Tolerance for <code>lambda = 0</code>; defaults to 0.02.</td></tr>
<tr valign="top"><td><code>xlab</code></td>
<td>
defaults to <code>"lambda"</code>.</td></tr>
<tr valign="top"><td><code>ylab</code></td>
<td>
defaults to <code>"log-Likelihood"</code>.</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
additional parameters to be used in the model fitting.</td></tr>
</table>

<h3>Value</h3>

<p>
A list of the <code>lambda</code> vector and the computed profile
log-likelihood vector, invisibly if the result is plotted.</p>

<h3>Side Effects</h3>

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


<h3>References</h3>

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


<h3>Examples</h3>

<pre>
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))
</pre>



<hr><div align="center">[Package <em>MASS</em> version 7.2-44 <a href="00Index.html">Index]</a></div>

</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -