helper_from_ranks_to_integrable_values: Helper function for get_Y_AB_bounds_bootstrap.

View source: R/RVCompare.R

helper_from_ranks_to_integrable_valuesR Documentation

Helper function for get_Y_AB_bounds_bootstrap.

Description

The density corresponding to the position in index j is computed, given the SORTED ranks, and r_max

Usage

helper_from_ranks_to_integrable_values(
  rank_interval_mult,
  j_max,
  cumulative = FALSE
)

Arguments

j_max

the largest index that will be used.

cumulative

wether the integrable values should be cumulative or not. Cumulative values used in the estimation of the empirical distribution.

sortedRanks

the sorted ranks of either the observed X_A or X_B.

r_max

The largest rank.

Value

the probability density in this point

Examples

### Example 1 ###
rank_interval_mult <- c(1,0.5,1,0,0,0.5)
j_max <- 1000 -1
densities <- helper_from_ranks_to_integrable_values(rank_interval_mult, j_max, cumulative=FALSE)
plot(x = 0:j_max / j_max, y = densities, type="l")

cumulative_densities <- helper_from_ranks_to_integrable_values(
    rank_interval_mult, j_max, cumulative=TRUE)
plot(x = 0:j_max / j_max, y = cumulative_densities, type="l")

EtorArza/RVCompare documentation built on Jan. 11, 2025, 12:05 a.m.