plot.cv.ncpen: plot.cv.ncpen: plot cross-validation error curve.

Description Usage Arguments Author(s) References See Also Examples

View source: R/ncpen_cpp_wrap.R

Description

The function Produces a plot of the cross-validated errors from cv.ncpen object.

Usage

1
2
3
## S3 method for class 'cv.ncpen'
plot(x, type = c("rmse", "like"), log.scale = FALSE,
  ...)

Arguments

x

fitted cv.ncpen object.

type

(character) a cross-validated error type which is either rmse or like.

log.scale

(logical) whether to use log scale of lambda for horizontal axis.

...

other graphical parameters to plot

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

cv.ncpen

Examples

1
2
3
4
5
6
7
### 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)

ncpen documentation built on May 1, 2019, 9:21 p.m.