ma_rmvnorm: Simulating Normally Distributed Data

Description Usage Arguments Value See Also Examples

View source: R/ma_rmvnorm.R

Description

Some functions for normally distributed data.

The function ma_rmvnorm is like mvtnorm::rmvnorm, but allows for a covariance matrix sigma which can have zero variances.

Usage

1
ma_rmvnorm(n, mu=NULL, sigma, eps=1e-10)

Arguments

n

Sample size

mu

Mean vector

sigma

Covariance matrix

eps

Trimming constant for zero variances

Value

Matrix of simulated values

See Also

MASS::mvrnorm

Examples

1
2
3
4
5
6
#############################################################################
# EXAMPLE 1: Two-dimensional simulation with zero variance at dimension 1
#############################################################################

sigma <- matrix( c(0,0,0,1), nrow=2, ncol=2)
miceadds::ma_rmvnorm( n=10, sigma=sigma )

miceadds documentation built on Dec. 11, 2018, 5:05 p.m.