rmvnormal: Multivariate Gaussian simulation

View source: R/RcppExports.R

rmvnormalR Documentation

Multivariate Gaussian simulation

Description

Fast simulation from multivariate Gaussian probability distribution.

Usage

rmvnormal(n, mu, sigma)

Arguments

n

An integer giving the number of observations to be simulated.

mu

A numeric vector of dimension p giving the means of normal distribution.

sigma

A variance-covariance matrix of dimension p times p.

Details

The rmvnormal function is copied from the GMCM-package. It is similar to rmvnorm from the mvtnorm-package.

Value

Returns a n by p matrix of observations from a multivariate normal distribution with the given mean mu and covariance

Author(s)

Anders Ellern Bilgrau

Examples


rmvnormal(n = 10, mu = 1:4, sigma = diag(4))


CFWP/rags2ridges documentation built on Oct. 21, 2023, 10:19 a.m.