predict.wbaconlm {wbacon} | R Documentation |
Predicted Values Based on the Weighted BACON Linear Regression
Description
This function does exactly what predict
does for
the linear model lm
; see predict.lm
for
more details.
Usage
## S3 method for class 'wbaconlm'
predict(object, newdata, se.fit = FALSE, scale = NULL,
df = Inf, interval = c("none", "confidence", "prediction"), level = 0.95,
type = c("response", "terms"), terms = NULL, na.action = na.pass, ...)
Arguments
object |
Object of class inheriting from |
newdata |
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used. |
se.fit |
A switch |
scale |
Scale parameter for std.err. calculation, |
df |
Degrees of freedom for scale, |
interval |
Type of interval calculation, |
level |
Tolerance/confidence level, |
type |
Type of prediction (response or model term),
|
terms |
If |
na.action |
function determining what should be done with missing
values in |
... |
further arguments passed to
|
Value
predict.wbaconlm
produces a vector of predictions or a matrix of
predictions and bounds with column names fit
, lwr
, and
upr
if interval
is set. For type = "terms"
this
is a matrix with a column per term and may have an attribute
"constant"
.
If se.fit
is
TRUE
, a list with the following components is returned:
fit |
vector or matrix as above |
se.fit |
standard error of predicted means |
residual.scale |
residual standard deviations |
df |
degrees of freedom for residual |
See Also
Examples
data(iris)
m <- wBACON_reg(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width,
data = iris)
predict(m, newdata = data.frame(Sepal.Width = 1, Petal.Length = 1,
Petal.Width = 1))