Skip to contents

The distribution of the remaining dimensions of a mvdist_normal() given fixed values for a subset. Available for "MultivariateNormal" only.

Usage

mvdist_conditional(mv, given, values)

Arguments

mv

a corehydro_mvdist of family "MultivariateNormal".

given

the 1-based dimensions being conditioned on.

values

the values given is fixed at, the same length as given.

Value

a corehydro_mvdist over the complement of given.

Details

The returned distribution inherits mv's Genz integrator settings, as mvdist_marginal() does: seed, max_evaluations, abs_error, and rel_error all carry over.

Examples

mvdist_mean(mvdist_conditional(mvdist_normal(c(1, 2, 3), diag(3)), given = 2, values = 5))
#> [1] 1 3