powered by
Plot coefficient profiles along the LAR path
# S3 method for lar plot(x, xvar=c("norm","step","lambda"), breaks=TRUE, omit.zeros=TRUE, var.labels=TRUE, ...)
Object returned by a call to lar function (not the lars function!)
lar
lars
Either "norm" or "step" or "lambda", determining what is plotted on the x-axis
Should vertical lines be drawn at each break point in the piecewise linear coefficient paths? Default is TRUE
Should segments of the coefficients paths that are equal to zero be omitted (to avoid clutter in the figure)? Default is TRUE
Should paths be labelled with corresponding variable numbers? Default is TRUE
Additional arguments for plotting
# NOT RUN { set.seed(43) 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 LAR, plot results larfit = lar(x,y) plot(larfit) # }
Run the code above in your browser using DataLab