## Predicting car engine shape type, v or straight ##
# run the model
car_m1 <- assess(formula=vs ~ hp + am, data=mtcars, regression="logistic")
# create a decide object, enter the model name and a threshold on the logit scale
d1 <- decide(x=car_m1, threshold= -0.767)
# View model classification related statistics
print(d1$Model.Summary$Classification)
# View decision curve analysis results like 'net benefit' at various thresholds
print(d1$DCA)
Run the code above in your browser using DataLab