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

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.

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")

RVCompare documentation built on Aug. 21, 2023, 5:13 p.m.