plot.multistep: Plot a multidimensional step function

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/helper.R

Description

Produces covariate plots for a multidimensional step function.

Usage

1
2
## S3 method for class 'multistep'
plot(x = NULL, xpoints=NULL, ypoints = NULL, dims = 1:max(nrow(x$param), ncol(xpoints)) , ylimit = cbind(min(min(x),max(x)), max(max(x), min(x))), grid = TRUE, add = FALSE, titles = !add,...)

Arguments

x

A multistep object.

xpoints

Covariate values of additional points to be plotted.

ypoints

Response values of additional points to be plotted.

dims

Dimensions to be shown. (Default is all)

ylimit

Y-axis limits to be used for all plots.

grid

If TRUE, construct a grid of plots to show all plotted components. Otherwise, plot each component after the other normally.

add

If TRUE, superimpose new plot on the old plot. This may false for more than one component.

titles

If TRUE, add names of covariates to plot.

...

Additional arguments to be passed to plot.

Value

If grid is TRUE, return the old par() values before function was called.

Author(s)

Zhou Fang

References

Zhou Fang and Nicolai Meinshausen (2009), Liso for High Dimensional Additive Isotonic Regression, available at http://blah.com

See Also

multistep, plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Use the method on a simulated data set
set.seed(79)
n <- 100; p <- 50

## Simulate design matrix and response
x <- matrix(runif(n * p, min = -2.5, max = 2.5), nrow = n, ncol = p)
y <- scale(3 * (x[,1]> 0), scale=FALSE)  + x[,2]^3 + rnorm(n)

## try lambda = 2
fits <- liso.backfit(x,y, 2)
fits2 <- liso.backfit(x,y, 4)

## Plot in some different ways
plot(fits, dim=2)
plot(fits2, dim=2, col=2, add=TRUE)

plot(fits, grid=FALSE)
plot(fits)

liso documentation built on May 29, 2017, 6:47 p.m.

Related to plot.multistep in liso...