sqrt_matrix: Compute the Square Root of a Matrix

View source: R/helper_fun.R

sqrt_matrixR Documentation

Compute the Square Root of a Matrix

Description

Computes the square root of a symmetric matrix via eigen decomposition. Negative eigenvalues are handled by taking the square root of their absolute values.

Usage

sqrt_matrix(Amat)

Arguments

Amat

A numeric symmetric matrix.

Value

A matrix that is the square root of Amat.


TVMVP documentation built on June 28, 2025, 1:08 a.m.