Description Usage Arguments Examples
Create a plot representing a Hosmer-Lemeshow goodness-of-fit test.
1 2 3 4 5 6 7 8 | make_validation_plot(models, validation_data, buckets = 10,
dep_var_name = "dep_var", id_var_name = "id", plot = TRUE, ...)
output_validation_plot(validation_object_list, scale = 1,
output_type = grDevices::png, filename = NULL, ...)
validation_plot(models, validation_data, buckets = 10,
dep_var_name = "dep_var", id_var_name = "id", plot = TRUE, ...)
|
models |
list or numeric. If a numeric vector, this will be
interpreted as a vector of risk scores to compare to a
dependent variable. If a |
validation_data |
data.frame or integer. If a If an integer is passed, this will be assumed to be the dependent
variable in the same order as the scores given by the |
buckets |
integer. The number of cuts (by default, 10). |
dep_var_name |
character. The name of the dependent variable.
This will be used to extract a column out of the |
id_var_name |
character. The name of the ID variable. By default,
simply |
plot |
logical. Whether or not to plot to an output device
straight away, by default |
... |
additional arguments to |
validation_object_list |
validation_object_list. Internal parameter. |
scale |
numeric. Adjust plot size, by default |
output_type |
function. The output type for the plot, by default |
filename |
character. Path to save output png file (for only a single plot_type). |
1 2 3 4 5 6 7 8 9 | ## Not run:
set.seed(100) # to make it determenistic
validation_dat <- data.frame(dep_var = sample(c(1, 0), 1000, replace = TRUE))
good_preds <- validation_dat[['dep_var']] + rnorm(NROW(validation_dat))
bad_preds <- rnorm(NROW(validation_dat))
make_validation_plot(models = list(good_mod = good_preds, bad_mod = bad_preds),
validation_data = validation_dat)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.