sample_covariance_matrix {oeli}R Documentation

Sample covariance matrix

Description

This function samples a covariance matrix from an inverse Wishart distribution.

Usage

sample_covariance_matrix(dim, df = dim, scale = diag(dim), diag = FALSE)

Arguments

dim

An integer, the dimension.

df

An integer greater or equal dim, the degrees of freedom of the inverse Wishart distribution.

scale

A covariance matrix of dimension dim, the scale matrix of the inverse Wishart distribution.

diag

Set to TRUE for a diagonal matrix.

Value

A covariance matrix.

Examples

sample_covariance_matrix(dim = 3)


[Package oeli version 0.5.2 Index]