mvnorm: Multivariate Normal Samples

View source: R/SGAT.R

mvnormR Documentation

Multivariate Normal Samples

Description

Construct a sampler to draw multivariate Normal deviates.

Usage

mvnorm(S, s = 1, n = 1, tol = 1e-06)

bmvnorm(S, m, s = 1)

Arguments

S

a covariance matrix or an array of covariance matrices.

s

a scale factor applied to S.

n

number of deviates to draw.

tol

minimum allowable variance.

m

dimension of each deviate.

Details

Construct a sampler that draws Multivariate Normal deviates with covariances determined by S and mean determined by its first argument.

The mvnorm function constructs a function that generates n independent Multivariate Normal deviates, where the covariance of each deviate is specified by S which must be either a mxm covariance matrix or an nxmxm array of covariance matrices.

The bmvnorm constructs a function that generates n correlated Multivariate Normal deviates, where the joint covariance is specified by S which must be a nmxnm covariance matrix (as generated by chainBcov).

Value

A function that draws bivariate Normal deviates with mean given by its first argument.


SWotherspoon/SGAT documentation built on June 1, 2022, 10:49 p.m.