Description Usage Arguments Details Author(s) Examples
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.
1 2 |
x |
Fitted 'regRSM' model object. |
... |
Other arguments to plot. |
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.
Pawel Teisseyre, Robert A. Klopotek.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.