bytau.plot.rq.pen.seq.cv: Plot of coefficients varying by quantiles for rq.pen.seq.cv...

View source: R/mainFunctions.R

bytau.plot.rq.pen.seq.cvR Documentation

Plot of coefficients varying by quantiles for rq.pen.seq.cv object

Description

Produces plots of how coefficient estimates vary by quantile for models selected by using cross validation.

Usage

## S3 method for class 'rq.pen.seq.cv'
bytau.plot(
  x,
  septau = TRUE,
  cvmin = TRUE,
  useDefaults = TRUE,
  vars = NULL,
  ...
)

Arguments

x

An rq.pen.seq.cv object

septau

Whether optimal tuning parameters are estimated separately for each quantile.

cvmin

Whether the minimum cv error should be used or the one standard error rule.

useDefaults

Set to FALSE if you want to use something besides minimum cv or 1se.

vars

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()

Value

Returns plots of coefficient estimates varying by quantile.

Author(s)

Ben Sherwood, ben.sherwood@ku.edu

Examples

 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)

rqPen documentation built on Aug. 25, 2023, 1:07 a.m.