Skip to contents

Computes the difference between the empirical CDFs of the data and the predictions.

Usage

compute_cdf_diff(Y, f, grid, w = NULL)

Arguments

Y

(matrix): n x 1 matrix of observed data.

f

(matrix): n x 1 matrix of predictions.

grid

(matrix): Grid of values to compute the CDF at.

w

(vector, optional): n-vector of sample weights.

Value

(list): Difference between the empirical CDFs of the data and the predictions and its standard deviation at the specified grid points.

Examples


Y <- c(1, 2, 3, 4, 5)

f <- c(1.1, 2.2, 3.3, 4.4, 5.5)

grid <- seq(0, 6, by = 0.5)

compute_cdf_diff(Y, f, grid)
#> [[1]]
#>  [1] 0.0 0.0 0.2 0.0 0.2 0.0 0.2 0.0 0.2 0.0 0.2 0.0 0.0
#> 
#> [[2]]
#>  [1] 0.0 0.0 0.4 0.0 0.4 0.0 0.4 0.0 0.4 0.0 0.4 0.0 0.0
#>