check_correlation_matrix {oeli} | R Documentation |
Check correlation matrix
Description
These functions check whether the input fulfills the properties of a correlation matrix.
Usage
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))
Arguments
x |
[any] |
dim |
[ |
tolerance |
[ |
.var.name |
[ |
add |
[ |
Value
Same as documented in check_matrix
.
See Also
Other matrix helpers:
check_covariance_matrix()
,
check_transition_probability_matrix()
,
cov_to_chol()
,
diff_cov()
,
insert_matrix_column()
,
matrix_diagonal_indices()
,
matrix_indices()
,
sample_correlation_matrix()
,
sample_covariance_matrix()
,
sample_transition_probability_matrix()
,
stationary_distribution()
Examples
M <- matrix(c(1, 0.9, 0.9, 0.9, 1, -0.9, 0.9, -0.9, 1), nrow = 3)
check_correlation_matrix(M)
test_correlation_matrix(M)
## Not run:
assert_correlation_matrix(M)
## End(Not run)
[Package oeli version 0.6.0 Index]