Predicts returning p-hats
Usage
# S3 method for class 'fast_logistic_regression'
predict(object, newdata, type = "response", ...)Arguments
- object
The object built using the
fast_logistic_regressionorfast_logistic_regression_stepwisewrapper functions- newdata
A matrix of observations where you wish to predict the binary response.
- type
The type of prediction required. The default is
"response"which is on the response scale (i.e. probability estimates) and the alternative is"link"which is the linear scale (i.e. log-odds).- ...
Further arguments passed to or from other methods
Examples
library(MASS); data(Pima.te)
flr = fast_logistic_regression(
Xmm = model.matrix(~ . - type, Pima.te),
ybin = as.numeric(Pima.te$type == "Yes")
)
phat = predict(flr, model.matrix(~ . - type, Pima.te))
