# NOT RUN {
## Setup
n <- 15
d <- 2
df <- 3.1 # degree-of-freedom parameter
loc <- rep(0, d)
scale <- diag(d)
## Define the quantile function of an IG(nu/2, nu/2) distribution
qmix <- function(u, df) 1 / qgamma(1 - u, shape = df/2, rate = df/2)
## Sample data
set.seed(1) # for reproducibility
x <- rnvmix(n, qmix = qmix, df = df, loc = loc, scale = scale)
## QQ Plot of empirical quantiles vs true quantiles, all values estimated
## via RQMC:
qqplot_maha(x, qmix = qmix, loc = loc, scale = scale, df = df)
## Same could be obtained by specifying 'qmix' as string in which case
## qqplot_maha() calls qf()
qqplot_maha(x, qmix = "inverse.gamma", loc = loc, scale = scale, df = df)
# }
Run the code above in your browser using DataLab