fastglm-sandwich: Empirical estimating-function and bread methods for 'fastglm'...

fastglm-sandwichR Documentation

Empirical estimating-function and bread methods for 'fastglm' objects

Description

Methods for 'sandwich::estfun()' and 'sandwich::bread()', which let 'sandwich::vcovCL()', 'sandwich::vcovBS()', and the rest of the *sandwich* machinery work directly on 'fastglm' and 'fastglmFit' objects. Load 'sandwich' ('library(sandwich)') before calling them.

Usage

estfun.fastglm(x, ...)

estfun.fastglmFit(x, ...)

bread.fastglm(x, ...)

bread.fastglmFit(x, ...)

Arguments

x

a fitted object of class '"fastglm"' or '"fastglmFit"'.

...

not used.

Details

'estfun(x)' returns the per-observation empirical estimating-function contributions, an 'n x p' matrix whose 'i'-th row is '(y_i - mu_i) * mu.eta_i / variance(mu_i) * x_i / dispersion'. 'bread(x)' returns ‘(X’ W X)^(-1) * n * dispersion' (the *sandwich* convention). For poisson, binomial, and negative-binomial families the dispersion is fixed at 1, exactly matching 'sandwich::estfun.glm()' / 'sandwich::bread.glm()'.

Value

'estfun()' returns an 'n x p' matrix; 'bread()' returns a 'p x p' matrix.


fastglm documentation built on Aug. 27, 2026, 9:07 a.m.