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

📄 coefplot.html

📁 应用程序 偏最小二乘法回归分析 pls matlab
💻 HTML
字号:
<html><head><title>R: Plot Regression Coefficients of PLSR and PCR 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 coefplot {pls}"><tr><td>coefplot {pls}</td><td align="right">R Documentation</td></tr></table>
<h2>Plot Regression Coefficients of PLSR and PCR models</h2>


<h3>Description</h3>

<p>
Function to plot the regression coefficients of an <code>mvr</code> object.
</p>


<h3>Usage</h3>

<pre>
coefplot(object, ncomp = object$ncomp, separate = FALSE, cumulative = TRUE,
         intercept = FALSE, nCols, nRows, varnames = FALSE, type = "l",
         lty = 1:nLines, lwd = NULL, pch = 1:nLines, cex = NULL,
         col = 1:nLines, legendpos, xlab = "variable",
         ylab = "regression coefficient", ...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
an <code>mvr</code> object.  The fitted model.</td></tr>
<tr valign="top"><td><code>ncomp</code></td>
<td>
integer vector.  The number of components to include.  If
<code>length(ncomp) &gt; 1</code>, coefficients for each model size is plotted.</td></tr>
<tr valign="top"><td><code>separate</code></td>
<td>
logical.  If <code>TRUE</code>, coefficients for different model
sizes are blotted in separate plots.</td></tr>
<tr valign="top"><td><code>cumulative</code></td>
<td>
logical.  Whether cumulative (the default) or
individual coefficients for each component should be plotted.  See
<code><a href="coef.mvr.html">coef.mvr</a></code> for details.</td></tr>
<tr valign="top"><td><code>intercept</code></td>
<td>
logical.  Whether coefficients for the intercept should
be plotted.  Ignored if <code>cumulative = FALSE</code>.  Defaults to
<code>FALSE</code>.  See <code><a href="coef.mvr.html">coef.mvr</a></code> for details.</td></tr>
<tr valign="top"><td><code>nCols, nRows</code></td>
<td>
integer.  The number of coloumns and rows the
plots will be laid out in.  If not specified, <code>coefplot</code> tries
to be intelligent.</td></tr>
<tr valign="top"><td><code>varnames</code></td>
<td>
logical.  If <code>TRUE</code>, the <i>x</i> axis tick marks
are labelled with the variable names.</td></tr>
<tr valign="top"><td><code>type</code></td>
<td>
character.  What type of plot to make.  Defaults to
<code>"l"</code> (lines).  Alternative types include <code>"p"</code> (points)
and <code>"b"</code> (both).  See <code><a href="../../Zelig/html/plot.zelig.html">plot</a></code> for a complete list
of types.</td></tr>
<tr valign="top"><td><code>lty</code></td>
<td>
vector of line types (recycled as neccessary).  Line types can be
specified as integers or character strings (see <code><a href="../../graphics/html/par.html">par</a></code>
for the details).</td></tr>
<tr valign="top"><td><code>lwd</code></td>
<td>
vector of positive numbers (recycled as neccessary), giving
the width of the lines.</td></tr>
<tr valign="top"><td><code>pch</code></td>
<td>
plot character.  A character string or a vector of
single characters or integers (recycled as neccessary).  See
<code><a href="../../graphics/html/points.html">points</a></code> for all alternatives.</td></tr>
<tr valign="top"><td><code>cex</code></td>
<td>
numeric vector of character expansion sizes (recycled as
neccessary) for the plotted symbols.</td></tr>
<tr valign="top"><td><code>col</code></td>
<td>
character or integer vector of colors for plotted lines and
symbols (recycled as neccessary).  See <code><a href="../../graphics/html/par.html">par</a></code> for the details.</td></tr>
<tr valign="top"><td><code>legendpos</code></td>
<td>
Legend position.  Optional.  Ignored if <code>separate</code> is
<code>TRUE</code>.  If present, a legend is drawn at the given position.
The position can be specified symbolically (e.g., <code>legendpos =
      "topright"</code>).  This requires <font face="Courier New,Courier" color="#666666"><b>R</b></font> &gt;= 2.1.0.  Alternatively, the
position can be specified explicitly (<code>legendpos = t(c(x,y))</code>)
or interactively (<code>legendpos = <a href="../../graphics/html/locator.html">locator</a>()</code>).  This only
works well for plots of single-response models.</td></tr>
<tr valign="top"><td><code>xlab,ylab</code></td>
<td>
titles for <i>x</i> and <i>y</i> axes.  Typically
character strings, but can be expressions (e.g.,
<code>expression(R^2)</code> or lists.  See <code><a href="../../graphics/html/title.html">title</a></code> for details.</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
Further arguments sent to the underlying plot functions.</td></tr>
</table>

<h3>Details</h3>

<p>
<code>coefplot</code> handles multiple responses by making one plot for each
response.  If <code>separate</code> is <code>TRUE</code>, separate plots are made
for each combination of model size and response.  The plots are laid
out in a rectangular fashion.
</p>
<p>
If <code>legendpos</code> is given, a legend is drawn at the given position
(unless <code>separate</code> is <code>TRUE</code>).
</p>
<p>
If <code>varnames</code> is <code>TRUE</code>, the <i>x</i> axis tick marks are
labelled with the regressor variable names.  Hint: If there is not
enough room for all names to be displayed, try reducing the text size
by giving the argument <code>cex.axis</code> with a value less than 1, or
try printing the names vertically by giving the argument <code>las = 3</code>.
</p>
<p>
The function can also be called through the <code>mvr</code> plot method by
specifying <code>plottype = "coefficients"</code>.
</p>


<h3>Note</h3>

<p>
<code><a href="../../graphics/html/legend.html">legend</a></code> has many options.  If you want greater
control over the appearance of the legend, omit the <code>legendpos</code>
argument and call <code>legend</code> manually.
</p>


<h3>Author(s)</h3>

<p>
Ron Wehrens and Bj鴕n-Helge Mevik
</p>


<h3>See Also</h3>

<p>
<code><a href="mvr.html">mvr</a></code>, <code><a href="plot.mvr.html">plot.mvr</a></code>, <code><a href="coef.mvr.html">coef.mvr</a></code>,
<code><a href="../../Zelig/html/plot.zelig.html">plot</a></code>, <code><a href="../../graphics/html/legend.html">legend</a></code>
</p>


<h3>Examples</h3>

<pre>
data(NIR)
mod.nir &lt;- plsr(y ~ X, ncomp = 8, data = NIR)
## Not run: 
coefplot(mod.nir, ncomp = 1:6)
plot(mod.nir, plottype = "coefficients", ncomp = 1:6) # Equivalent to the previous
## Plot with legend:
coefplot(mod.nir, ncom = 1:6, legendpos = "bottomright")
## End(Not run)

data(sensory)
mod.sens &lt;- plsr(Quality ~ Panel, ncomp = 4, data = sensory)
## Not run: coefplot(mod.sens, ncomp = 2:4, separate = TRUE)
</pre>



<hr><div align="center">[Package <em>pls</em> version 1.1-0 <a href="00Index.html">Index]</a></div>

</body></html>

⌨️ 快捷键说明

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