plot_x: Plot the distribution of the independent variable per class...

View source: R/plot_x.R

plot_xR Documentation

Plot the distribution of the independent variable per class from a cutpointr object

Description

Given a cutpointr object this function plots the distribution(s) of the independent variable(s) and the respective cutpoints per class.

Usage

plot_x(x, display_cutpoint = TRUE, ...)

Arguments

x

A cutpointr object.

display_cutpoint

(logical) Whether or not to display the optimal cutpoint as a vertical line.

...

Additional arguments (unused).

See Also

Other cutpointr plotting functions: plot.cutpointr(), plot_cut_boot(), plot_cutpointr(), plot_metric_boot(), plot_metric(), plot_precision_recall(), plot_roc(), plot_sensitivity_specificity()

Examples

opt_cut <- cutpointr(suicide, dsi, suicide)
plot_x(opt_cut)

## With subgroup
opt_cut_2groups <- cutpointr(suicide, dsi, suicide, gender)
plot_x(opt_cut_2groups)

cutpointr documentation built on April 14, 2022, 1:06 a.m.