covgen

Share:

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()

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