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

While plus() produces turning points in a path of critical points of a penalized squared loss, predict.plus extracts coefficients and make predictions at particular penalty levels by linear interpolation. The extracted coefficients are the same as these produced by plus() when the input lam is the same.

1 2 3 4 |

`object` |
A fitted plus object |

`lam` |
A decreasing sequence of nonnegative numbers as penalty levels at which the coefficients are extracted and predictions are required. Default is the ordered values of lam.path generated by plus(). |

`newx` |
x values at which the fit is required. If newx is not set, coefficients are extacted but predictions are not produced. |

`...` |
Additonal arguments for generic methods |

A list containing the following items:

`lambda` |
penalty levels at which the coefficients and predicted values are extracted. |

`coefficients` |
extracted coefficients. |

`dimension` |
number of nonzero coefficients. |

`r.square` |
R-square as the ratio of the total centered residual sum of squares and the total centered sum of squares. |

`step` |
number of plus steps required to compute the coefficients. |

`method` |
including the LASSO, MC+, and SCAD. |

`newy` |
extracted predictions at newx; not produced if newx is not supplied. |

`...` |
Additonal arguments for generic methods |

Cun-Hui Zhang and Ofer Melnik

Zhang, C.-H. (2010). Nearly unbiased variable selection under minimax concave penalty. Annals of Statistics 38, 894-942.

print, plot, plus

1 2 3 4 5 6 7 8 9 10 11 | ```
data(sp500)
attach(sp500)
x <- sp500.percent[,3: (dim(sp500.percent)[2])]
y <- sp500.percent[,1]
object <- plus(x,y,method="mc+")
## extract coefficients for the first 10 values of lam.path at values in x
extracted.values <- predict(object, lam = sort(object$lam.path[1:10],decreasing=TRUE), newx=object$x)
extracted.coef <- coef(object, lam = sort(object$lam.path[1:10],decreasing=TRUE))
detach(sp500)
``` |

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.