predict.cv.ncvreg  R Documentation 
Similar to other predict methods, this function returns predictions from a
fitted ncvreg
object.
## S3 method for class 'cv.ncvreg'
predict(
object,
X,
type = c("link", "response", "class", "coefficients", "vars", "nvars"),
which = object$min,
...
)
## S3 method for class 'cv.ncvreg'
coef(object, which = object$min, ...)
## S3 method for class 'cv.ncvsurv'
predict(
object,
X,
type = c("link", "response", "survival", "median", "coefficients", "vars", "nvars"),
which = object$min,
...
)
## S3 method for class 'ncvreg'
predict(
object,
X,
type = c("link", "response", "class", "coefficients", "vars", "nvars"),
lambda,
which = 1:length(object$lambda),
...
)
## S3 method for class 'ncvreg'
coef(object, lambda, which = 1:length(object$lambda), drop = TRUE, ...)
object 
Fitted 
X 
Matrix of values at which predictions are to be made. Not used for

type 
Type of prediction:

which 
Indices of the penalty parameter 
... 
Not used. 
lambda 
Values of the regularization parameter 
drop 
If coefficients for a single value of 
The object returned depends on type.
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: 232253. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/10AOAS388")}
ncvreg()
data(Heart)
fit < ncvreg(Heart$X, Heart$y, family="binomial")
coef(fit, lambda=0.05)
head(predict(fit, Heart$X, type="link", lambda=0.05))
head(predict(fit, Heart$X, type="response", lambda=0.05))
head(predict(fit, Heart$X, type="class", lambda=0.05))
predict(fit, type="vars", lambda=c(0.05, 0.01))
predict(fit, type="nvars", lambda=c(0.05, 0.01))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.