plot.l1celist: Plot Method for 'l1celist' Objects

Description Usage Arguments Value Examples

View source: R/plot.q

Description

Plots a l1celist object on the current graphics device.

Usage

1
2
3
## S3 method for class 'l1celist'
plot(x, plot=TRUE, all=TRUE, constrained=FALSE,
              type = "b", xlab = "bounds", ylab = "coeff | bounds", ...)

Arguments

x

fitted model object of class l1celist.

plot

logical; if TRUE a matplot() of all the coefficients in the list against the relative bound (absolute bound if relative is not present) is plotted. Otherwise no plot is done.

all

logical; if FALSE, then only the non-zero coefficients are returned.

constrained

if TRUE then only the coefficients that were constrained are returned.

type, xlab, ylab, ...

further arguments with useful defaults passed to matplot.

Value

A matrix with the bound(s) (relative [if used] and absolute), the Lagrangian(s) and coefficints of the fitted model(s).

Examples

1
2
3
4
data(Prostate)
l1c.P <- l1ce(lpsa ~ ., Prostate, bound=(1:20)/20)
length(l1c.P)# 20 l1ce models
plot(l1c.P)

Example output

R Package to solve regression problems while imposing
	 an L1 constraint on the parameters. Based on S-plus Release 2.1
Copyright (C) 1998, 1999
Justin Lokhorst   <jlokhors@stats.adelaide.edu.au>
Berwin A. Turlach <bturlach@stats.adelaide.edu.au>
Bill Venables     <wvenable@stats.adelaide.edu.au>

Copyright (C) 2002
Martin Maechler <maechler@stat.math.ethz.ch>
[1] 20

lasso2 documentation built on Oct. 8, 2021, 9:10 a.m.