This function samples a correlation matrix by sampling a covariance matrix from an inverse Wishart distribution and transforming it to a correlation matrix.
Usage
sample_correlation_matrix(dim, df = dim, scale = diag(dim))
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
.
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_covariance_matrix()
,
sample_transition_probability_matrix()
,
stationary_distribution()