predict.mvlm: mvlm Model Predictions

Description Usage Arguments Value Author(s) Examples

Description

predict method for class mvlm. To predict using new data, the predictor data frame passed to newdata must have the same number of columns as the data used to fit the model, and the names of each variable must match the names of the original data.

Usage

1
2
## S3 method for class 'mvlm'
predict(object, newdata, ...)

Arguments

object

Output from mvlm

newdata

Data frame of observations on the predictors used to fit the model.

...

Further arguments passed to or from other methods.

Value

A data frame of predicted values

Author(s)

Daniel B. McArtor (dmcartor@nd.edu) [aut, cre]

Examples

1
2
3
4
5
6
7
8
data(mvlmdata)
Y.train <- as.matrix(Y.mvlm[1:150,])
X.train <- X.mvlm[1:150,]

mvlm.res <- mvlm(Y.train ~ ., data = X.train)

X.test <- X.mvlm[151:200,]
Y.predict <- predict(mvlm.res, newdata = X.test)

dmcartor/MVLM documentation built on May 15, 2019, 9:19 a.m.