Learn R Programming

loopevd (version 1.0.2)

df_cievd: Return a numeric vector of confidence intervals for EVD quantiles

Description

Return a numeric vector of confidence intervals for EVD quantiles

Usage

df_cievd(x, p, ci = 0.95, cores = 8)

Value

A numeric vector giving the confidence interval widths for each row in x.

Arguments

x

A data.frame of EVD parameters and associated covariance matrix. Must include 'loc', 'scale', 'shape', and 'cov*' column names.

p

A single probability value for the quantile (e.g. 0.99).

ci

Confidence level for the interval (default is 0.95).

cores

Number of parallel cores to use. If >1, parallel processing is used via parallel::parLapply().

Details

This function calculates confidence intervals for extreme value quantiles using the delta method. The required input is a row-wise data frame with EVD parameters and their variance-covariance elements. Internally uses ismev::gev.rl.gradient() and ismev::q.form().

See Also

ismev::gev.rl.gradient(), ismev::q.form()

Examples

Run this code
if (FALSE) {
  df <- data.frame(loc = 1, scale = 0.5, shape = 0.1,
                   cov_1 = 0.01, cov_2 = 0.001, cov_3 = 0.002,
                   cov_4 = 0.001, cov_5 = 0.01, cov_6 = 0.001,
                   cov_7 = 0.002, cov_8 = 0.001, cov_9 = 0.02)
  df_cievd(df, p = 0.99, ci = 0.95, cores = 2)
}

Run the code above in your browser using DataLab