sample_mvnorm: Sample from a multivariate normal distribution

Description Usage Arguments Value

View source: R/sample-pars.R

Description

A wrapper for MASS::mvrnorm that returns a matrix (rather than a vector) if n = 1. Also, elements in which the mean vector has missing values.

Usage

1
sample_mvnorm(n, mu, Sigma)

Arguments

n

The number of samples required.

mu

A vector giving the means of the variables.

Sigma

A positive-definite symmetric matrix specifying the covariance matrix of the variables.

Value

Matrix of samples from the multivariate distribution.


InnovationValueInitiative/IVI-RA documentation built on Oct. 20, 2020, 10:02 p.m.