plot.ic.glmnet: Plot the information criterion curve through the...

Description Usage Arguments Examples

View source: R/plot.ic.glmnet.R

Description

Plots the information criterion curve as a function of log(lambda) through the regularization path.

Usage

1
2
## S3 method for class 'ic.glmnet'
plot(x, ...)

Arguments

x

A ic.glmnet object estimated using the ic.glmnet function.

...

Arguments to be passed to other methods.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## == This example uses the Brazilian inflation data from
#Garcia, Medeiros and Vasconcelos (2017) == ##
data("BRinf")

## == Data preparation == ##
## == The model is yt = a + Xt-1'b + ut == ##
aux = embed(BRinf,2)
y=aux[,1]
x=aux[,-c(1:ncol(BRinf))]

## == LASSO == ##
lasso=ic.glmnet(x,y,crit = "bic")
plot(lasso)

gabrielrvsc/HDeconometrics documentation built on April 28, 2020, 7:12 a.m.