proba_theoretical_first_excursion_iid: Probability P(Q(1)>=q a) that the height of the first...

View source: R/excursion.R

proba_theoretical_first_excursion_iidR Documentation

Probability P(Q(1)\geq a) that the height of the first excursion 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_first_excursion_iid(
  a,
  theta,
  theta_distribution,
  score_function
)

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)

Details

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 first excursion supposing an i.i.d model on the letters sequence

Examples

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

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