proba_theoretical_ith_excursion_iid: Probability P(Q(i)>=q a) that the height of the ith excursion...

View source: R/excursion.R

proba_theoretical_ith_excursion_iidR Documentation

Probability P(Q(i)\geq a) that the height of the ith excursion (sequential order) is greater or equal to a given a i.i.d. model on the letters sequence

Description

Mathematical definition of an excursion of the Lindley process is based on the record times of the partial sum sequence associated to the score sequence (see Karlin and Altschul 1990, Karlin and Dembo 1992) and define the successive times where the partial sums are strictly decreasing. There must be distinguished from the visual excursions of the Lindley sequence. The number i is the number of excursion in sequential order. Detailed definitions are given in the vignette.

Usage

proba_theoretical_ith_excursion_iid(
  a,
  theta,
  theta_distribution,
  score_function,
  i = 1
)

Arguments

a

score strictly positive

theta

vector containing the alphabet used

theta_distribution

distribution vector of theta

score_function

vector containing the scores of each letters of the alphabet (must be in the same order as theta)

i

Number of excursion in sequential order

Details

In the i.i.d., the distribution of the ith excursion is the same as the first excursion. This function is just for convenience, and the result is the same as proba_theoretical_first_excursion_iid. Beware that a sequence beginning with a negative score gives a "flat" excursion, with score 0 are considered.

Value

theoretical probability of reaching a score of a on the ith excursion supposing an i.i.d model on the letters sequence

See Also

proba_theoretical_first_excursion_iid

Examples

p1 <- proba_theoretical_ith_excursion_iid(3, c("a","b","c","d"), 
                                      c(a=0.1,b=0.2,c=0.4,d=0.3), c(a=-3,b=-1,c=1,d=2), i = 10)
p2 <- proba_theoretical_first_excursion_iid(3, c("a","b","c","d"), 
                                      c(a=0.1,b=0.2,c=0.4,d=0.3), c(a=-3,b=-1,c=1,d=2))
p1 == p2  #TRUE

localScore documentation built on April 3, 2025, 5:26 p.m.