predict.mvlm {MVLM} | R Documentation |
mvlm Model Predictions
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
## S3 method for class 'mvlm'
predict(object, newdata, ...)
Arguments
object |
Output from |
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
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)
[Package MVLM version 0.1.4 Index]