max_Q: Quantile of Maximum of Multivariate Normal Random Variable

View source: R/CI_intsec_RD.R

max_QR Documentation

Quantile of Maximum of Multivariate Normal Random Variable

Description

Calculates the quantile of maximum of a multivariate normal random variable, by a Monte Carlo simulation method.

Usage

max_Q(covmat, alpha, num_sim = 10^5)

Arguments

covmat

covariance matrix of the multivariate normal random variable.

alpha

desired upper quantile value.

num_sim

number of simulations used to calculate the quantile; the default is 10^5.

Value

(1 - α)th quantile of maximum of a multivariate normal random variable.

Examples

covmat <- matrix(c(1, 0.5, 0.5, 1), 2, 2)
max_Q(covmat, 0.05)

koohyun-kwon/rdadapt documentation built on May 8, 2022, 8:49 p.m.