predict.lqs.html
来自「本程序是基于linux系统下c++代码」· HTML 代码 · 共 100 行
HTML
100 行
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Predict from an lqs Fit</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 predict.lqs {MASS}"><tr><td>predict.lqs {MASS}</td><td align="right">R Documentation</td></tr></table>
<h2>Predict from an lqs Fit</h2>
<h3>Description</h3>
<p>
Predict from an resistant regression fitted by <code>lqs</code>.
</p>
<h3>Usage</h3>
<pre>
## S3 method for class 'lqs':
predict(object, newdata, na.action = na.pass, ...)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
object inheriting from class <code>"lqs"</code>
</td></tr>
<tr valign="top"><td><code>newdata</code></td>
<td>
matrix or data frame of cases to be predicted or, if <code>object</code>
has a formula, a data frame with columns of the same names as the
variables used. A vector will be interpreted
as a row vector. If <code>newdata</code> is missing, an attempt will be
made to retrieve the data used to fit the <code>lqs</code> object.
</td></tr>
<tr valign="top"><td><code>na.action</code></td>
<td>
function determining what should be done with missing
values in <code>newdata</code>. The default is to predict <code>NA</code>.</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
arguments to be passed from or to other methods.</td></tr>
</table>
<h3>Details</h3>
<p>
This function is a method for the generic function
<code>predict()</code> for class <code>lqs</code>.
It can be invoked by calling <code>predict(x)</code> for an
object <code>x</code> of the appropriate class, or directly by
calling <code>predict.lqs(x)</code> regardless of the
class of the object.
</p>
<p>
Missing values in <code>newdata</code> are handled by returning <code>NA</code> if the
linear fit cannot be evaluated. If <code>newdata</code> is omitted and
the <code>na.action</code> of the fit omitted cases, these will be omitted on the
prediction.
</p>
<h3>Value</h3>
<p>
A vector of predictions.</p>
<h3>Author(s)</h3>
<p>
B.D. Ripley
</p>
<h3>See Also</h3>
<p>
<code><a href="lqs.html">lqs</a></code>
</p>
<h3>Examples</h3>
<pre>
set.seed(123)
fm <- lqs(stack.loss ~ ., data = stackloss, method = "S", nsamp = "exact")
predict(fm, stackloss)
</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 + =
减小字号Ctrl + -
显示快捷键?