plot.hqreg: Plot coefficients from a "hqreg" object

Description Usage Arguments Author(s) References See Also Examples

View source: R/plot.hqreg.R

Description

Produce a plot of the coefficient paths for a fitted "hqreg" object.

Usage

1
2
3
## S3 method for class 'hqreg'
plot(x, xvar = c("lambda", "norm"), log.l= TRUE, nvars = TRUE, 
    alpha = 1, ...)

Arguments

x

A hqreg object.

xvar

What is on the X-axis. "lambda" plots against the lambda sequence, "norm" against the L1-norm of the coefficients. Default is "lambda".

log.l

Should log(lambda) be used instead of lambda when xvar = "lambda"? Default is TRUE. It has no effect for "norm".

nvars

If TRUE (the default), places an axis on top of the plot denoting the number of variables with nonzero coefficients at each lambda.

alpha

A value between 0 and 1 for alpha transparency channel(0 means transparent and 1 means opaque), helpful when the number of variables is large.

...

Other graphical parameters to plot.

Author(s)

Congrui Yi <congrui-yi@uiowa.edu>

References

Yi, C. and Huang, J. (2016) Semismooth Newton Coordinate Descent Algorithm for Elastic-Net Penalized Huber Loss Regression and Quantile Regression, https://arxiv.org/abs/1509.02957
Journal of Computational and Graphical Statistics, accepted in Nov 2016
http://www.tandfonline.com/doi/full/10.1080/10618600.2016.1256816

See Also

hqreg

Examples

1
2
3
4
5
6
7
8
9
X = matrix(rnorm(1000*100), 1000, 100)
beta = rnorm(10)
eps = 4*rnorm(1000)
y = drop(X[,1:10] %*% beta + eps) 
fit = hqreg(X, y)
par(mfrow = c(2,2))
plot(fit)
plot(fit, nvars = FALSE, alpha = 0.5)
plot(fit, xvar = "norm")

Example output



hqreg documentation built on May 1, 2019, 10:21 p.m.