Provides plots of cross-validation results by lambda. If septau is set to TRUE then plots the cross-validation results for each quantile. If septau is set to FALSE then provides one plot for cross-validation results across all quantiles.
# S3 method for rq.pen.seq.cv
plot(
x,
septau = ifelse(x$fit$penalty != "gq", TRUE, FALSE),
tau = NULL,
logLambda = TRUE,
main = NULL,
...
)
Plots of the cross validation results by lambda.
The rq.pen.seq.cv object
If set to true then optimal tuning parameters are selected seperately for each quantile and there will be a different plot for each quanitle.
Quantiles of interest.
Whether log(lambda) is used for the x-axis
Title to the plot
Additional parameters sent to the plot function.
Ben Sherwood, ben.sherwood@ku.edu
set.seed(1)
x <- matrix(rnorm(100*8,sd=1),ncol=8)
y <- 1 + x[,1] + 3*x[,3] - x[,8] + rt(100,3)
m1 <- rq.pen.cv(x,y,tau=c(.1,.3,.7))
plot(m1)
plot(m1,septau=FALSE)
Run the code above in your browser using DataLab