powered by
Produces plots of how coefficient estimates vary by quantile for models selected by using cross validation.
# S3 method for rq.pen.seq.cv bytau.plot( x, septau = ifelse(x$fit$penalty != "gq", TRUE, FALSE), cvmin = TRUE, useDefaults = TRUE, vars = NULL, ... )
Returns plots of coefficient estimates varying by quantile.
An rq.pen.seq.cv object
Whether optimal tuning parameters are estimated separately for each quantile.
Whether the minimum cv error should be used or the one standard error rule.
Set to FALSE if you want to use something besides minimum cv or 1se.
Index of the variables to plot with 1 being the intercept, 2 being the first predictor, etc. Default is to include all variables.
Additional parameters sent to coef()
Ben Sherwood, ben.sherwood@ku.edu
set.seed(1) x <- matrix(runif(800),nrow=100) y <- 1 + x[,1] - 3*x[,5] + (1+x[,4])*rnorm(100) lmcv <- rq.pen.cv(x,y,tau=seq(.1,.9,.1)) bytau.plot(lmcv)
Run the code above in your browser using DataLab