Returns the prediction of a binary variable by a gradual measurement using logistic regression.
Arguments
- data
A data frame.
- dv
A binary variable in that data frame.
- iv
A gradual variable in that data frame used for predicting
dv
.
Examples
data(mtcars)
mtcars$pred <- get_prediction(mtcars, mtcars$am, mtcars$drat)