predict.mrrr | R Documentation |
The function predict.mrrr makes predictions for a test/validation set based on a fitted mrrr model
## S3 method for class 'mrrr'
predict(object, newX, ...)
object |
An |
newX |
An N by P matrix with predictor variables for a test/validation set |
... |
additional arguments to be passed. |
This function returns an object of the class p.mru
with components:
Ghat |
Predicted values for the test set |
## Not run:
data(dataExample_lpca)
Y = as.matrix(dataExample_mru[-c(1:20) , 1:8])
X = as.matrix(dataExample_mru[-c(1:20) , 9:13])
newY = as.matrix(dataExample_mru[1:20 , 1:8])
newX = as.matrix(dataExample_mru[1:20 , 9:13])
output = mrrr(Y = Y, X = X, S = 2)
preds = predict(output, newX = newX)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.