Skip to contents

n_sims draws of a multivariate_normal() or multivariate_lognormal(), one component per key. Simulation i draws only from stream i of seed, so the result reproduces by seed on any number of threads; its provenance records the model, its dimension, the seed and a hash of the mean and covariance.

Usage

predictive_from_gaussian(joint, n_sims, seed, keys = NULL)

Arguments

joint

A multivariate_gaussian.

n_sims

Number of simulations.

seed

Seed.

keys

A data frame with one row per component and one column per dimension; by default component = 1, 2, ....

Examples

mvn <- multivariate_normal(c(100, 50), matrix(c(400, 120, 120, 100), 2))
pd <- predictive_from_gaussian(mvn, 20000, 1, keys = data.frame(line = c("auto", "property")))
mean(pd)
#> [1] 149.8658