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

📄 scoreplot.html

📁 应用程序 偏最小二乘法回归分析 pls matlab
💻 HTML
字号:
<html><head><title>R: Plots of Scores, Loadings and Correlation Loadings</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 scoreplot {pls}"><tr><td>scoreplot {pls}</td><td align="right">R Documentation</td></tr></table>
<h2>Plots of Scores, Loadings and Correlation Loadings</h2>


<h3>Description</h3>

<p>
Functions to make scatter plots of scores or correlation loadings, and
scatter or line plots of loadings.
</p>


<h3>Usage</h3>

<pre>
scoreplot(object, comps = 1:2, labels, identify = FALSE, type = "p",
          xlab, ylab, ...)
## S3 method for class 'scores':
plot(x, ...)

loadingplot(object, comps = 1:2, scatter = FALSE, labels, identify = FALSE,
            type, lty, lwd = NULL, pch, cex = NULL, col, legendpos,
            xlab, ylab, ...)
## S3 method for class 'loadings':
plot(x, ...)

corrplot(object, comps = 1:2, labels, identify = FALSE, type = "p",
          xlab, ylab, ...)
</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>comps</code></td>
<td>
integer vector.  The components to plot.</td></tr>
<tr valign="top"><td><code>scatter</code></td>
<td>
logical.  Whether the loadings should be plotted as a
scatter instead of as lines.</td></tr>
<tr valign="top"><td><code>labels</code></td>
<td>
optional.  Labels to use instead of plotting symbols.
If <code>scatter = FALSE</code> in <code>loadingplot</code>, they are used to
label the <i>x</i> axis tick marks.  Either a vector (of length &gt; 1)
of labels, or one of <code>"names"</code> and <code>"numbers"</code> for using
row names and row numbers, respectively.</td></tr>
<tr valign="top"><td><code>identify</code></td>
<td>
logical.  Whether to use <code>identify</code> to
interactively identify points.  See below.</td></tr>
<tr valign="top"><td><code>type</code></td>
<td>
character.  What type of plot to make.  Defaults to
<code>"p"</code> (points) for scatter plots and <code>"l"</code> (lines) for
line plots.  See <code><a href="../../Zelig/html/plot.zelig.html">plot</a></code> for a complete list
of types (not all types are possible/meaningful for all plots).</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>scatter</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>).</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 or lists.  See
<code><a href="../../graphics/html/title.html">title</a></code> for details.</td></tr>
<tr valign="top"><td><code>x</code></td>
<td>
a <code>scores</code> or <code>loadings</code> object.  The scores or
loadings to plot.</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
further arguments sent to the underlying plot function(s).</td></tr>
</table>

<h3>Details</h3>

<p>
<code>plot.scores</code> is simply a wrapper calling <code>scoreplot</code>,
passing all arguments.  Similarly for <code>plot.loadings</code>.
</p>
<p>
<code>scoreplot</code> makes one or more scatter plots of the scores,
depending on how many components are selected.  If one or two
components are selected, and <code>identify</code> is <code>TRUE</code>, the
function <code><a href="../../spatstat/html/identify.ppp.html">identify</a></code> is used to interactively identify
points.
</p>
<p>
If <code>scatter</code> is <code>TRUE</code>, <code>loadingplot</code> works exactly
like <code>scoreplot</code>.  Otherwise, it makes a lineplot of the selected
loading vectors, and if <code>identify</code> is <code>TRUE</code>,
uses <code><a href="../../spatstat/html/identify.ppp.html">identify</a></code> to interactively identify points.  Also,
if <code>legendpos</code> is given, a legend is drawn at the position
indicated.
</p>
<p>
<code>corrplot</code> works exactly like <code>scoreplot</code>, except that at
least two components must be selected.  The &ldquo;correlation
loadings&rdquo;, i.e. the correlations between each variable and the
selected components, are plotted as pairwise scatter plots, with
two concentric circles of radius 0.5 and 1.
</p>
<p>
<code>scoreplot</code>, <code>loadingplot</code> and <code>corrplot</code> can also be
called through the plot method for <code>mvr</code> objects, by specifying
<code>plottype</code> as <code>"scores"</code>, <code>"loadings"</code> or
<code>"correlation"</code>, respectively.  See <code><a href="plot.mvr.html">plot.mvr</a></code>.
</p>
<p>
<code>scoreplot</code> and <code>loadingplot</code> also work with
<code>princomp</code> objects.  (However, <code>plot(scores(...))</code> and
<code>plot(loadings(...))</code> will not work.)
</p>


<h3>Value</h3>

<p>
The functions return whatever the underlying plot function (or
<code>identify</code>) returns.</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>
<p>
Graphical parametres (such as <code>pch</code> and <code>cex</code>) can also
be used with <code>scoreplot</code> and <code>corrplot</code>.  They are not
listed in the argument list simply because they are not handled
specifically in the function (unlike in <code>loadingplot</code>), but
passed directly to the underlying plot functions by <code>...</code>.
</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="scores.html">scores</a></code>, <code><a href="../../stats/html/loadings.html">loadings</a></code>, <code><a href="../../spatstat/html/identify.ppp.html">identify</a></code>,
<code><a href="../../graphics/html/legend.html">legend</a></code>
</p>


<h3>Examples</h3>

<pre>
data(NIR)
mod &lt;- plsr(y ~ X, ncomp = 10, data = NIR)
## These three are equivalent:
## Not run: 
scoreplot(mod, comps = 1:5)
plot(scores(mod), comps = 1:5)
plot(mod, plottype = "scores", comps = 1:5)

loadingplot(mod, comps = 1:5)
loadingplot(mod, comps = 1:5, legendpos = "topright") # With legend
loadingplot(mod, comps = 1:5, scatter = TRUE) # Plot as scatterplots

corrplot(mod, comps = 1:2)
corrplot(mod, comps = 1:3)
## End(Not run)
</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 + -