predict.regRSM {regRSM} | R Documentation |
Predictions from a 'regRSM' object.
Description
This function makes predictions from a 'regRSM' object.
Usage
## S3 method for class 'regRSM'
predict(object, xnew,...)
Arguments
object |
Fitted 'regRSM' model object |
xnew |
Matrix of new values for x at which predictions are to be made. |
... |
Additional arguments not used. |
Details
Prediction is made based on a final model which is chosen using validation set or Generalized Information Criterion (GIC).
Value
predict.regRSM produces a vector of predictions.
Author(s)
Pawel Teisseyre, Robert A. Klopotek.
Examples
p = 100
n = 100
beta1 = numeric(p)
beta1[c(1,5,10)] = c(1,1,1)
x = matrix(0,ncol=p,nrow=n)
xtest = matrix(0,ncol=p,nrow=n)
for(j in 1:p){
x[,j] = rnorm(n,0,1)
xtest[,j] = rnorm(n,0,1)
}
y = x %*% beta1 + rnorm(n)
p1 = regRSM(x,y)
predict(p1,xtest)
[Package regRSM version 0.5 Index]