compute_sigma {geex}R Documentation

Compute empirical sandwich covariate estimator

Description

Computes Σ=A1B(A1)T\Sigma = A^{-1} B (A^{-1})^T with provided AA and BB 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)

[Package geex version 1.1.1 Index]