plot.cv.ncpen {ncpen} | R Documentation |
The function Produces a plot of the cross-validated errors from cv.ncpen
object.
## S3 method for class 'cv.ncpen' plot(x, type = c("rmse", "like"), log.scale = FALSE, ...)
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 |
Dongshin Kim, Sunghoon Kwon, Sangin Lee
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.
### 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)