mvngen

Share:

Description

sample nitem elements from N(mean, cov).

Usage

1
mvngen(mean, cov, nitem)

Arguments

mean

numeric vector.

cov

covariance matrix.

nitem

number of items to generate.

Value

nitem x d matrix with elements as rows (further denoted as a matrix of row-elements).

Author(s)

Pierrick Bruneau

Examples

1
2
3
4
5
6
7
mvngen(c(0, 0), diag(2), 5)
#       [,1]        [,2]
#[1,] -0.09898211  1.4516438
#[2,]  0.20814926 -0.1233861
#[3,]  0.18410071  0.5995621
#[4,]  0.65994562  0.8328315
#[5,]  2.33098055 -0.5943117

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.