Skip to contents

Maps a vector of independent uniform draws into one point on the distribution's scale via the Cholesky decomposition of its covariance. This is not a true multivariate quantile (there is no unique multivariate analogue of the univariate inverse CDF); it is exactly the map upstream implements: mean + L %*% qnorm(p) where L is the Cholesky factor.

Usage

mvdist_inverse_cdf(mv, p)

Arguments

mv

a corehydro_mvdist of family "MultivariateNormal" or "MultivariateStudentT".

p

numeric vector of probabilities in (0, 1) (see Details for the required length).

Value

a numeric vector of length mvdist_dimension().

Details

MultivariateNormal takes dimension probabilities; MultivariateStudentT takes dimension + 1 (the last value drives the chi-squared mixing variable) and still returns dimension values.

Examples

mvdist_inverse_cdf(mvdist_normal(c(0, 0), diag(2)), c(0.5, 0.5))
#> [1] 0 0