estimkiener11: Estimation Functions with 5, 7 or 11 Quantiles

Description Usage Arguments Details See Also Examples

View source: R/n_estimation.R

Description

Several functions to estimate the parameters of asymmetric Kiener distributions with just 5, 7 or 11 quantiles.

Usage

1
2
3
4
5
estimkiener11(x11, p11, ord = 7, maxk = 10)

estimkiener7(x7, p7, maxk = 10)

estimkiener5(x5, p5, maxk = 20, maxe = 0.9)

Arguments

ord

integer. Option for probability selection and treatment.

maxk

numeric. Maximum value for k (kappa).

x5, x7, x11

vector of 5, 7 or 11 quantiles.

p5, p7, p11

vector of 5, 7 or 11 probabilities.

maxe

numeric. Maximum value for abs(e) (epsilon). Maximum is maxe = 1.

Details

These functions, called by paramkienerX5, paramkienerX7, paramkienerX, use 5, 7 or 11 probabilites and quantiles to estimate the parameters of Kiener distributions.

p5, x5 are obtained with functions fiveprobs(X) and quantile(p5).

p7, x7 are obtained with functions sevenprobs(X) and quantile(p7).

p11, x11 are obtained with functions elevenprobs(X) and quantile(p11).

The extraction of the 11 probabilities is controlled with the option ord which can take 12 integer values, ord = 7 being the default. Small dataset should consider ord = 5 and large dataset can consider ord = 12:

  1. c(p1, 0.35, 0.50, 0.65, 1-p1)

  2. c(p2, 0.35, 0.50, 0.65, 1-p2)

  3. c(p1, p2, 0.35, 0.50, 0.65, 1-p2, 1-p1)

  4. c(p1, p2, p3, 0.35, 0.50, 0.65, 1-p3, 1-p2, 1-p1)

  5. c(p1, 0.25, 0.50, 0.75, 1-p1)

  6. c(p2, 0.25, 0.50, 0.75, 1-p2)

  7. c(p1, p2, 0.25, 0.50, 0.75, 1-p2, 1-p1)

  8. c(p1, p2, p3, 0.25, 0.50, 0.75, 1-p3, 1-p2, 1-p1)

  9. c(p1, 0.25, 0.35, 0.50, 0.65, 0.75, 1-p1)

  10. c(p2, 0.25, 0.35, 0.50, 0.65, 0.75, 1-p2)

  11. c(p1, p2, 0.25, 0.35, 0.50, 0.65, 0.75, 1-p2, 1-p1)

  12. c(p1, p2, p3, 0.25, 0.35, 0.50, 0.65, 0.75, 1-p3, 1-p2, 1-p1)

p5 = fiveprobs(X) corresponds to c(p1, 0.25, 0.50, 0.75, 1-p1).

p7 = sevenprobs(X) corresponds to c(p1, p2, 0.25, 0.50, 0.75, 1-p2, 1-p1).

The above probabilities are then transfered to the quantile function whose parameter type can change significantly the extracted quantiles. Our experience is that type = 6 is appropriate when k > 1.9 and type = 5 is appropriate when k < 1.9. Other types type = 8 and type = 9 can be considered as well. The other types should be ignored. (Note: when k < 1.5, algorithm algo = "reg" returns better results).

Parameter maxk controls the maximum allowed value for estimated parameter k. Reasonnable values are maxk = 10, 15, 20. Default is maxk = 10 to be consistent with regkienerLX.

See Also

elevenprobs, paramkienerX, quantile, roundcoefk.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
    

require(timeSeries)

## Choose j in 1:16. Choose ord in 1:12 (7 is default)
j    <- 5
ord  <- 5
DS   <- getDSdata()
p11  <- elevenprobs(DS[[j]])
x11  <- quantile(DS[[j]], probs = p11, na.rm = TRUE, names = TRUE, type = 6) 
round(estimkiener11(x11, p11, ord), 3)

## Compare the results obtained with the 12 different values of ord on stock j
compare <- function(ord, x11, p11) {estimkiener11(x11, p11, ord)}
coefk   <- t(sapply(1:12, compare, x11, p11)) 
rownames(coefk) <- 1:12
mcoefk  <- apply(coefk, 2, mean) # the mean of the 12 results above
roundcoefk(rbind(coefk, mcoefk), 13)

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