Learn R Programming

fastliu (version 1.0)

plot.liureg: Plot method for liureg objects

Description

Plot method for liureg objects

Usage

# S3 method for liureg
plot(x, type = c("coefpath", "biasvar", "info"), ...)

Value

No return value.

Arguments

x

A liureg object.

type

What to plot on the vertical axis. coefpath plots the coefficient path of the Liu regression; biasvar generates a bias-variaance plot, info plots the information criteria corresponding the regularization parameter values.

...

Other graphical parameters to plot.

Author

Murat Genç

See Also

liureg(), predict(), summary()

Examples

Run this code
Hitters <- na.omit(Hitters)
X <- model.matrix(Salary ~ ., Hitters)[, -1]
y <- Hitters$Salary
liu.mod <- liureg(X, y, seq(0, 1, 0.01))

# Liu coefficient paths
plot(liu.mod)

# Bias-variance trade-off
plot(liu.mod, type="biasvar")

Run the code above in your browser using DataLab