# Note these examples are similar to catdv_vs_dvprobs
if (FALSE) {
# Test M3 model
pkpd_m3 %>%
# Need to ensure var types are set
set_var_types(catdv=BLQ,dvprobs=LIKE) %>%
# Set probs
set_dv_probs(1, 1~LIKE, .dv_var = BLQ) %>%
# Optional, but useful to set levels
set_var_levels(1, BLQ = lvl_bin()) %>%
# Generate typical ROC curve
roc_plot()
# Test categorical model
vismo_xpdb <- vismo_pomod %>%
set_var_types(.problem=1, catdv=DV, dvprobs=matches("^P\\d+$")) %>%
set_dv_probs(.problem=1, 0~P0,1~P1,ge(2)~P23)
# Various cutpoints (note axes labels and texts)
vismo_xpdb %>%
roc_plot(type = "p") # space plot
vismo_xpdb %>%
roc_plot(cutpoint=2, type = "cak") # with area and key point
vismo_xpdb %>%
roc_plot(cutpoint=3, type = "cak")
# alternative model example
vismo_xpdb2 <- vismo_dtmm %>%
set_var_types(.problem=1, catdv=DV, dvprobs=matches("^P\\d+$")) %>%
set_dv_probs(.problem=1, 0~P0,1~P1,ge(2)~P23)
vismo_xpdb2 %>%
roc_plot(cutpoint=2, type = "cak")
}
Run the code above in your browser using DataLab