pit_df: Probability Integral Transformation (data.frame Format)

Description Usage Arguments Details Value References Examples

View source: R/pit.R

Description

Wrapper around 'pit()' for use in data.frames

Usage

1
2
3
4
5
6
7
8
pit_df(
  data,
  plot = TRUE,
  full_output = FALSE,
  n_replicates = 20,
  num_bins = NULL,
  verbose = FALSE
)

Arguments

data

a data.frame with the following columns: 'true_value', 'prediction', 'sample'

plot

logical. If TRUE, a histogram of the PIT values will be returned as well

full_output

return all individual p_values and computed u_t values for the randomised PIT. Usually not needed.

n_replicates

the number of tests to perform, each time re-randomising the PIT

num_bins

the number of bins in the PIT histogram (if plot == TRUE) If not given, the square root of n will be used

verbose

if TRUE (default is FALSE) more error messages are printed. Usually, this should not be needed, but may help with debugging.

Details

see pit

Value

a list with the following components:

References

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, <doi:10.1371/journal.pcbi.1006785>

Examples

1
2
example <- scoringutils2::continuous_example_data
result <- pit_df(example, full_output = TRUE)

nikosbosse/scoringutils2 documentation built on Jan. 8, 2021, 12:12 p.m.