plot.l4acp: plot the threshold grid curve produced by l4acp

Description Usage Arguments Details Examples

Description

Plots the lasso objective function's value obtained from running regression by putting each value of threshold parameter's range in a model. It can also make plot not from lasso objective function but from ordinary MSE. Since l4acp can use multiple lambda values, it is required to specify a lambda value. Note that the plot has x-axis corresponding to threshold grid, and y-axis corresponding to the lasso objective function.

Usage

1
2
## S3 method for class 'l4acp'
plot(x, v = 1, type = "lasso", ...)

Arguments

x

fitted "l4acp" object

v

inex for a lambda value. Remember that you can only make a plot with one lambda value. By default it is 1, which is the largest among the lambda sequence used for l4acp. It is consistent to the column names of a matrix that comes out when you call the fitted model in console.

type

If the type is "lasso", it makes the plot by the value of a lasso objective function. Else if the type is "mse", it makes the plot by the value of a MSE.

...

other arguments that can be applied to l4acp

Details

A plot is produced, and nothing is returned

Examples

1
2
3
4
5
6
7
8
# using 'lr' as an threshold variable
data("grdata")
lrdata <- grdata[(!is.na(grdata[,"lr"])),]
x <- lrdata[,c(4:dim(grdata)[2])]
q <- lrdata[,"lr"]
y <- lrdata[,"gr"]
fit <- l4acp(x=x, y=y, q=q, s=0.00094)
plot(fit, type="lasso")

wsggong/toronto documentation built on May 15, 2019, 1:21 p.m.