data.table::setDTthreads(1) # only needed to avoid issues on CRAN
# PIT histogram in vector based format
true_values <- rnorm(30, mean = 1:30)
predictions <- replicate(200, rnorm(n = 30, mean = 1:30))
pit <- pit_sample(true_values, predictions)
plot_pit(pit)
# quantile-based pit
pit <- pit(example_quantile, by = c("model"))
plot_pit(pit, breaks = seq(0.1, 1, 0.1))
# sample-based pit
pit <- pit(example_integer, by = c("model"))
plot_pit(pit)
Run the code above in your browser using DataLab