Learn R Programming

RVCompare (version 0.1.8)

helper_from_ranks_to_integrable_values: 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
)

Value

the probability density in this point

Arguments

rank_interval_mult

the rank interval vector. See `ranksOfObserved`.

j_max

the largest index that will be used.

cumulative

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

Examples

Run this code
### 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")

Run the code above in your browser using DataLab