| Type: | Package |
| Title: | Approximation to the Survival Functions of Quadratic Forms of Gaussian Variables |
| Version: | 0.2.1 |
| 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 (2022) "A fast and accurate approximation to the distributions of quadratic forms of Gaussian variables" <doi:10.1080/10618600.2021.2000423>. |
| License: | GPL-2 |
| URL: | https://github.com/ZWuLab/Qapprox |
| BugReports: | https://github.com/ZWuLab/Qapprox/issues |
| Imports: | stats |
| Encoding: | UTF-8 |
| RoxygenNote: | 6.1.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-08-09 18:01:42 UTC; zheyangwu |
| Author: | Hong Zhang [aut], Judong Shen [aut], Zheyang Wu [aut, cre] |
| Maintainer: | Zheyang Wu <zheyangwu@wpi.edu> |
| Repository: | CRAN |
| Date/Publication: | 2026-08-24 18:30:15 UTC |
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")