solveV: Solve method for variance matrices.

Description Usage Arguments Details Value

View source: R/utils.R

Description

Solve method for variance matrices.

Usage

1
solveV(V, b, ldV = FALSE)

Arguments

V

Symmetric positive-definite (i.e., variance) matrix.

b

Optional vector or matrix for which to solve the system of equations V x = b. If missing calculates the inverse of V.

ldV

Optionally compute the log determinant as well.

Details

This function is faster and more stable than base::solve when V is known to be positive-definite.

Value

The solution of the system of equations, or a list with elements x and ldV returning the log-determinant as well.


mlysy/losmix documentation built on Jan. 18, 2021, 5:56 a.m.