Learn R Programming

sstvars (version 1.1.0)

check_Bt_Cpp: Check Matrix B Invertibility with C++ (Internal Function)

Description

This internal function takes a cube of matrices (all_Omegas), a matrix of weights (alpha_mt), and a numerical tolerance (posdef_tol) to check the invertibility of weighted sums of the matrices in the cube. For each row in alpha_mt, it computes a weighted sum of matrices, and checks if this sum is invertible by verifying that its determinant is not within the specified tolerance of zero.

Usage

check_Bt_Cpp(all_Omegas, alpha_mt, posdef_tol)

Value

A boolean value: `TRUE` if all weighted sums are invertible up to the specified tolerance, `FALSE` otherwise.

Arguments

all_Omegas

A cube (3D array) of impact matrices, with each slice being an inveritble square matrix.

alpha_mt

A matrix of weights, with as many columns as there are slices in all_Omegas.

posdef_tol

A strictly positive small number used as a tolerance for checking the invertibility of the matrix. The matrix is considered non-invertible if its determinant is less than this tolerance.