Learn R Programming

picasso (version 1.5)

predict.logit: Prediction Method for an Object with S3 Class "logit"

Description

Predict responses for new data using fitted models.

Usage

# S3 method for logit
predict(object, newdata, lambda.idx = c(1:3), p.pred.idx = c(1:5), ...)

Value

Numeric matrix of predicted Bernoulli probabilities. Rows correspond to observations in newdata; columns correspond to lambda.idx.

Arguments

object

An object with S3 class "logit".

newdata

Optional matrix/data frame used for prediction. If omitted, the training design matrix from fitting is used.

lambda.idx

Indices of regularization parameters along the solution path used for prediction. The default is c(1:3).

p.pred.idx

Optional row indices to subset returned predictions when explicitly set to a value different from the default c(1:5).

...

Arguments to be passed to methods.

Author

Jason Ge, Xingguo Li, Haoming Jiang, Mengdi Wang, Tong Zhang, Han Liu and Tuo Zhao
Maintainer: Tuo Zhao <tourzhao@gatech.edu>

Details

predict.logit returns predicted Bernoulli probabilities for newdata using fitted coefficients from object: $$ \hat{p} = \frac{e^{\hat{\beta}_0 + X_{new} \hat{\beta}}}{1+e^{\hat{\beta}_0 + X_{new} \hat{\beta}}}. $$

See Also

picasso and picasso-package.