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 "lm"

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 [logical] indicating if standard errors are required.

scale

Scale parameter for std.err. calculation, [numeric].

df

Degrees of freedom for scale, [integer].

interval

Type of interval calculation, [character]. Can be abbreviated.

level

Tolerance/confidence level, [numeric].

type

Type of prediction (response or model term), [character]. Can be abbreviated.

terms

If type = "terms", which terms (default is all terms), a [character] vector.

na.action

function determining what should be done with missing values in newdata. The default is to predict NA.

...

further arguments passed to predict.lm

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

wBACON_reg

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

[Package wbacon version 0.6-1 Index]