quad_form: Compute quadratic form

View source: R/tools.R

quad_formR Documentation

Compute quadratic form

Description

Compute quadratic form of a vector with a matrix, which can be the vector of coefficients and the covariance matrix extracted from a fitted model

Usage

quad_form(x, m = NULL, inv = TRUE, subset = NULL, vcov = NULL, ...)

Arguments

x

a numeric vector or a fitted model

m

a square numeric matrix

inv

a boolean, if TRUE (the default), the quadratic form is computed using the inverse of the matrix

subset

a subset of the vector and the corresponding subset of the matrix

vcov

if NULL the vcov method is used, otherwise it can be a function or, for micsr objects, a character

...

arguments passed to vcov if it is a function


micsr documentation built on June 8, 2025, 9:31 p.m.