This function checks whether the input is a symmetric, real matrix that fulfills the correlation matrix properties.
check_correlation_matrix(x, dim = NULL, tolerance = sqrt(.Machine$double.eps))assert_correlation_matrix(
x,
dim = NULL,
tolerance = sqrt(.Machine$double.eps),
.var.name = checkmate::vname(x),
add = NULL
)
test_correlation_matrix(x, dim = NULL, tolerance = sqrt(.Machine$double.eps))
Compare to check_matrix
.
Object to check.
An integer
, the matrix dimension.
A non-negative numeric
tolerance value.
[character(1)
]
Name of the checked object to print in assertions. Defaults to
the heuristic implemented in vname
.
[AssertCollection
]
Collection to store assertion messages. See AssertCollection
.