Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ma_rmvnorm

Simulating Normally Distributed Data


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

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

Examples

#############################################################################
# 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

Some Additional Multiple Imputation Functions, Especially for 'mice'

v3.11-6
GPL (>= 2)
Authors
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>), Simon Grund [aut] (<https://orcid.org/0000-0002-1290-8986>), Thorsten Henke [ctb]
Initial release
2021-01-21 11:48:47

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.