covgen: covgen

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/Rutils.R

Description

generates random definite positive matrices (i.e. valid covariance matrices).

Usage

1
covgen(d = 2, bounds = c(1, 5))

Arguments

d

rank of the square matrix to be returned.

bounds

minima and maximal values for diagonal values.

Value

random definite positive matrix

Note

Matrix cells are sampled with an heuristic not guaranteed to lead to definite positiveness: this characteristic is only controlled before function return. If positive definite after control, the matrix is returned. If not, an error message is issued.

Author(s)

Pierrick Bruneau

See Also

randomGmm

Examples

1
temp <- covgen()

VBmix documentation built on May 20, 2017, 12:34 a.m.

Search within the VBmix package
Search all R packages, documentation and source code