compute_sigma: Compute empirical sandwich covariate estimator

View source: R/compute_funs.R

compute_sigmaR Documentation

Compute empirical sandwich covariate estimator

Description

Computes Σ = A^{-1} B (A^{-1})^T with provided A and B matrices.

Usage

compute_sigma(A, B, solver = solve)

Arguments

A

a matrix, generally the .A slot in a sandwich_components object created in estimate_sandwich_matrices

B

a matrix, generally the .B slot in a sandwich_components object created in estimate_sandwich_matrices

solver

the function used to compute the inverse of A, Defaults to solve

Value

the matrix Ainv %*% B %*% t(Ainv)

Examples

A <- diag(2, nrow = 2, ncol = 2)
B <- matrix(4, nrow = 2, ncol = 2)
compute_sigma(A = A, B = B)

geex documentation built on Aug. 8, 2022, 5:05 p.m.