plot.cv.ncpen {ncpen} | R Documentation |
plot.cv.ncpen: plot cross-validation error curve.
Description
The function Produces a plot of the cross-validated errors from cv.ncpen
object.
Usage
## S3 method for class 'cv.ncpen'
plot(x, type = c("rmse", "like"), log.scale = FALSE,
...)
Arguments
x |
fitted |
type |
(character) a cross-validated error type which is either |
log.scale |
(logical) whether to use log scale of lambda for horizontal axis. |
... |
other graphical parameters to |
Author(s)
Dongshin Kim, Sunghoon Kwon, Sangin Lee
References
Lee, S., Kwon, S. and Kim, Y. (2016). A modified local quadratic approximation algorithm for penalized optimization problems. Computational Statistics and Data Analysis, 94, 275-286.
See Also
Examples
### linear regression with scad penalty
par(mfrow=c(1,2))
sam = sam.gen.ncpen(n=500,p=10,q=5,cf.min=0.5,cf.max=1,corr=0.5,family="gaussian")
x.mat = sam$x.mat; y.vec = sam$y.vec
fit = cv.ncpen(y.vec=y.vec,x.mat=x.mat,n.lambda=50,family="gaussian", penalty="scad")
plot(fit)
plot(fit,log.scale=F)
[Package ncpen version 1.0.0 Index]