powered by
Specify a matrix with constant values on the diagonal and on the off-diagonals. Such matrices can be used to vary the degree of dependency in covariate matrices, for example when evaluating accuracy of KL-divergence estimation algorithms.
constDiagMatrix(dim = 1, diag = 1, offDiag = 0)
A dim-by-dim matrix
dim
Dimension
Value at the diagonal
Value at off-diagonals
constDiagMatrix(dim = 3, diag = 1, offDiag = 0.9)
Run the code above in your browser using DataLab