plot.ncvreg | R Documentation |

Produces a plot of the coefficient paths for a fitted `ncvreg`

object.

```
## S3 method for class 'ncvreg'
plot(x, alpha = 1, log.l = FALSE, shade = TRUE, col, ...)
```

`x` |
Fitted |

`alpha` |
Controls alpha-blending, helpful when the number of features is large. Default is alpha=1. |

`log.l` |
Should horizontal axis be on the log scale? Default is FALSE. |

`shade` |
Should nonconvex region be shaded? Default is TRUE. |

`col` |
Vector of colors for coefficient lines. By default, evenly spaced colors are selected automatically. |

`...` |
Other graphical parameters to |

Patrick Breheny

Breheny P and Huang J. (2011) Coordinate descent algorithms for nonconvex
penalized regression, with applications to biological feature selection.
*Annals of Applied Statistics*, **5**: 232-253. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/10-AOAS388")}

`ncvreg()`

```
data(Prostate)
fit <- ncvreg(Prostate$X, Prostate$y)
plot(fit)
plot(fit, col="black")
plot(fit, log=TRUE)
fit <- ncvreg(Prostate$X, Prostate$y, penalty.factor=rep(c(1, 1, 1, Inf), 2))
plot(fit, col=c('red', 'black', 'green')) # Recycled among nonzero paths
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.