Package 'Qapprox'

Title: Approximation to the Survival Functions of Quadratic Forms of Gaussian Variables
Description: Calculates the right-tail probability of quadratic forms of Gaussian variables using the skewness-kurtosis ratio matching method, modified Liu-Tang-Zhang method and Satterthwaite-Welch method. The technical details can be found in Hong Zhang, Judong Shen and Zheyang Wu (2020) <arXiv:2005.00905>.
Authors: Hong Zhang
Maintainer: Hong Zhang <[email protected]>
License: GPL-2
Version: 0.2.0
Built: 2024-12-30 07:06:46 UTC
Source: https://github.com/cran/Qapprox

Help Index


Right-tail probability of quadratic forms of centered Gaussian variables.

Description

Right-tail probability of quadratic forms of centered Gaussian variables.

Usage

Qapprox(q, Sigma, A = NULL, method = "MR")

Arguments

q

- quantile, could be a vector.

Sigma

- covariance matrix of Gaussian variables.

A

- a positive-semi-definite matrix that defines the quadratic form.

method

- "MR": moment-ratio (skewness-kurtosis) matching method; "SW": Satterthwaite-Welch method that matches mean and variance; "LTZ4": Liu-Tang-Zhang method that matches the kurtosis.

Value

The right-tail probability of a quadratic form (Q = X'AX) of centered Gaussian variables.

References

1. Hong Zhang, Judong Shen and Zheyang Wu. "An efficient and accurate approximation to the distribution of quadratic forms of Gaussian variables", arXiv:2005.00905.

Examples

n <- 100
Sigma <- toeplitz(1/(1:n))
thr <- 180
Qapprox(thr, Sigma, method="SW")
Qapprox(thr, Sigma, method="LTZ4")
Qapprox(thr, Sigma, method="MR")

Right-tail probability of quadratic forms (Q = X'AX) of noncentral Gaussian variables.

Description

Right-tail probability of quadratic forms (Q = X'AX) of noncentral Gaussian variables.

Usage

Qapprox_nc(q, mu, Sigma, A = NULL, method = "MR")

Arguments

q

- quantile, could be a vector.

mu

- mean vector of Gaussian variables.

Sigma

- covariance matrix of Gaussian variables.

A

- a positive-semi-definite matrix that defines the quadratic form.

method

- "MR": moment-ratio (skewness-kurtosis) matching method; "SW": Satterthwaite-Welch method that matches mean and variance; "LTZ4": Liu-Tang-Zhang method that matches the kurtosis.

Value

The right-tail probability of a quadratic form (Q = X'AX) of noncentral Gaussian variables.

References

1. Hong Zhang, Judong Shen and Zheyang Wu. "An efficient and accurate approximation to the distribution of quadratic forms of Gaussian variables", arXiv:2005.00905.

Examples

n <- 100
Sigma <- toeplitz(1/(1:n))
mu <- rep(1, n)
thr <- 500
Qapprox_nc(thr, mu, Sigma, method="SW")
Qapprox_nc(thr, mu, Sigma, method="LTZ4")
Qapprox_nc(thr, mu, Sigma, method="MR")