Learn R Programming

oeli (version 0.5.2)

check_correlation_matrix: Check if an argument is a correlation matrix

Description

This function checks whether the input is a symmetric, real matrix that fulfills the correlation matrix properties.

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))

Value

Compare to check_matrix.

Arguments

x

Object to check.

dim

An integer, the matrix dimension.

tolerance

A non-negative numeric tolerance value.

.var.name

[character(1)]
Name of the checked object to print in assertions. Defaults to the heuristic implemented in vname.

add

[AssertCollection]
Collection to store assertion messages. See AssertCollection.