get_pit | R Documentation |
Compute the Probability Integral Transformation (PIT) for validated forecast objects.
get_pit(forecast, by, n_replicates = 100)
forecast |
A forecast object (a validated data.table with predicted and
observed values, see |
by |
Character vector with the columns according to which the
PIT values shall be grouped. If you e.g. have the columns 'model' and
'location' in the input data and want to have a PIT histogram for
every model and location, specify |
n_replicates |
The number of draws for the randomised PIT for discrete predictions. Will be ignored if forecasts are continuous. |
A data.table with PIT values according to the grouping specified in
by
.
Sebastian Funk, Anton Camacho, Adam J. Kucharski, Rachel Lowe, Rosalind M. Eggo, W. John Edmunds (2019) Assessing the performance of real-time epidemic forecasts: A case study of Ebola in the Western Area region of Sierra Leone, 2014-15, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pcbi.1006785")}
result <- get_pit(as_forecast(example_sample_continuous), by = "model")
plot_pit(result)
# example with quantile data
result <- get_pit(as_forecast(example_quantile), by = "model")
plot_pit(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.