predict.regRSM: Predictions from a 'regRSM' object.

Description Usage Arguments Details Value Author(s) Examples

Description

This function makes predictions from a 'regRSM' object.

Usage

1
2
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

regRSM documentation built on May 2, 2019, 7:01 a.m.