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
[
integer(1)
]
The dimension.- df
[
integer(1)
]
The degrees of freedom of the inverse Wishart distribution greater or equaldim
.- scale
[
matrix()
]
The scale covariance matrix of the inverse Wishart distribution of dimensiondim
.- diag
[
logical(1)
]
Diagonal matrix?
See also
Other matrix helpers:
check_correlation_matrix()
,
check_covariance_matrix()
,
check_transition_probability_matrix()
,
cov_to_chol()
,
diff_cov()
,
insert_matrix_column()
,
matrix_diagonal_indices()
,
matrix_indices()
,
sample_correlation_matrix()
,
sample_transition_probability_matrix()
,
stationary_distribution()