| xTAx {statnet.common} | R Documentation |
Common quadratic forms
Description
Common quadratic forms
Usage
xTAx(x, A)
xAxT(x, A)
xTAx_solve(x, A, ...)
xTAx_qrsolve(x, A, tol = 1e-07, ...)
sandwich_solve(A, B, ...)
Arguments
x |
a vector |
A |
a square matrix |
... |
additional arguments to subroutines |
tol |
tolerance argument passed to the relevant subroutine |
B |
a square matrix |
Details
These are somewhat inspired by emulator::quad.form.inv() and others.
Functions
-
xTAx(): Evaluatex'Axfor vectorxand square matrixA. -
xAxT(): EvaluatexAx'for vectorxand square matrixA. -
xTAx_solve(): Evaluatex'A^{-1}xfor vectorxand invertible matrixAusingsolve(). -
xTAx_qrsolve(): Evaluatex'A^{-1}xfor vectorxand matrixAusing QR decomposition and confirming thatxis in the span ofAifAis singular; returnsrankandnullityas attributes just in case subsequent calculations (e.g., hypothesis test degrees of freedom) are affected. -
sandwich_solve(): EvaluateA^{-1}B(A')^{-1}forBa square matrix andAinvertible.