View source: R/predict.cutpointr.R
| predict.cutpointr | R Documentation |
Predictions are made on the data.frame in newdata
using either the variable name or by applying the same transformation to
the data as in cutpointr. The class of the output will be identical to the class
of the predictor.
## S3 method for class 'cutpointr'
predict(object, newdata, cutpoint_nr = 1, ...)
object |
a cutpointr object. |
newdata |
a data.frame with a column that contains the predictor variable. |
cutpoint_nr |
if multiple optimal cutpoints were found this parameter defines which one should be used for predictions. Can be a vector if different cutpoint numbers are desired for different subgroups. |
... |
further arguments. |
Other main cutpointr functions:
add_metric(),
boot_ci(),
boot_test(),
cutpointr(),
multi_cutpointr(),
roc()
oc <- cutpointr(suicide, dsi, suicide)
## Return in-sample predictions
predict(oc, newdata = data.frame(dsi = oc$data[[1]]$dsi))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.