plot.regRSM: Plot from 'regRSM' object.

Description Usage Arguments Details Author(s) Examples

Description

This function produces a plot showing prediction errors on validation set (or the value of Generalized Information Criterion) with respect to the number of variables included in the model.

Usage

1
2
## S3 method for class 'regRSM'
plot(x,...)

Arguments

x

Fitted 'regRSM' model object.

...

Other arguments to plot.

Details

If Generalized Information Criterion (GIC) was used in the second step of RSM procedure (useGIC=TRUE) then the function produces a plot showing the value of GIC with respect to the number of variables included in the model. Model corresponding to the minimal value of GIC is chosen as a final one. If GIC was not used (useGIC=FALSE) and the validation set is supplied then the function produces a plot showing prediction errors on validation set with respect to the number of variables included in the model. Model corresponding to the minimal value of the prediction error is chosen as a final one.

Author(s)

Pawel Teisseyre, Robert A. Klopotek.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
p=500
n=50
beta1 = numeric(p)
beta1[c(1,5,10)]=c(1,1,1)  
x = matrix(0,ncol=p,nrow=n)
xval = matrix(0,ncol=p,nrow=n)
xtest = matrix(0,ncol=p,nrow=n)
for(j in 1:p){ 
    x[,j]=rnorm(n,0,1)
    xval[,j]=rnorm(n,0,1)  
}
y = x %*% beta1 + rnorm(n)
yval = xval %*% beta1 + rnorm(n)

p1=regRSM(x,y)
plot(p1)

p2 = regRSM(x,y,yval,xval,useGIC=FALSE)
plot(p2)

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

Related to plot.regRSM in regRSM...