View source: R/mainFunctions.R
bytau.plot.rq.pen.seq | R Documentation |
Plot of how coefficients change with tau.
## S3 method for class 'rq.pen.seq'
bytau.plot(x, a = NULL, lambda = NULL, lambdaIndex = NULL, vars = NULL, ...)
x |
An rq.pen.seq object |
a |
The tuning parameter a of interest |
lambda |
The lambda value of interest. |
lambdaIndex |
The lambda index of interest. Only specify lambdaIndex or lambda, not both. |
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() |
A plot of coefficient values by tau.
Ben Sherwood, ben.sherwood@ku.edu
set.seed(1)
x <- matrix(rnorm(800),nrow=100)
y <- 1 + x[,1] - 3*x[,5] + rnorm(100)
lassoModels <- rq.pen(x,y,tau=seq(.1,.9,.1))
bytau.plot(lassoModels,lambda=lassoModels$lambda[5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.