elevenprobs: Eleven, Seven, Five Probabilities

Description Usage Arguments See Also Examples

View source: R/n_estimation.R

Description

Extract from a dataset X a vector of 11, 7 or 5 probabilities:

where p1, p2 and p3 are the most extreme probabilities with values finishing by ..01, ..025 or ..05 that can be extracted from the dataset X. Parameters names are displayed if parnames = TRUE.

From version 1.8-0, p1 and 1-p1 can be associated to the i-th and (N-i)-th element.

Usage

1
2
3
4
5
elevenprobs(X, parnames = FALSE)

sevenprobs(X, parnames = FALSE)

fiveprobs(X, i = 4, parnames = FALSE)

Arguments

X

numeric. Vector of quantiles.

parnames

boolean. Output parameter vector with or without names.

i

integer. The i-th and (N-i)-th elements for which the probabilities p1 and 1-p1 are calculated. If (i == 0), the method used before version 1.8-0 : the extreme finishing by ..01, ..025 or ..05.

See Also

fitkienerX, estimkiener11.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
require(timeSeries)

## DS
DS  <- getDSdata()
for (j in 1:16) { print(round(elevenprobs(DS[[j]]), 6)) }
z   <- cbind(t(sapply(DS, elevenprobs)), sapply(DS, length))
colnames(z) <- c("p1","p2","p3","p.25","p.35","p.50","p.65","p.75","1-p3","1-p2","1-p1","length")
z

## Choose j in 1:16
j   <- 1
X   <- sort(DS[[j]])
leX <- logit(eX <- elevenprobs(X))
lpX <- logit(ppoints(length(X), a = 0))
plot(X, lpX)
abline(h = leX, lty = 3)
mtext(eX, side = 4, at = leX, las = 1, line = -3.3)

FatTailsR documentation built on March 12, 2021, 9:06 a.m.