plot.fs {selectiveInference} | R Documentation |
Plot function for forward stepwise regression
Description
Plot coefficient profiles along the forward stepwise path
Usage
## S3 method for class 'fs'
plot(x, breaks=TRUE, omit.zeros=TRUE, var.labels=TRUE, ...)
Arguments
x |
Object returned by a call to |
breaks |
Should vertical lines be drawn at each break point in the piecewise linear coefficient paths? Default is TRUE |
omit.zeros |
Should segments of the coefficients paths that are equal to zero be omitted (to avoid clutter in the figure)? Default is TRUE |
var.labels |
Should paths be labelled with corresponding variable numbers? Default is TRUE |
... |
Additional arguments for plotting |
Author(s)
Ryan Tibshirani, Rob Tibshirani, Jonathan Taylor, Joshua Loftus, Stephen Reid
Examples
set.seed(33)
n = 50
p = 10
sigma = 1
x = matrix(rnorm(n*p),n,p)
beta = c(3,2,rep(0,p-2))
y = x%*%beta + sigma*rnorm(n)
# run forward stepwise, plot results
fsfit = fs(x,y)
plot(fsfit)
[Package selectiveInference version 1.2.5 Index]