bread {sandwich}R Documentation

Bread for Sandwiches

Description

Generic function for extracting an estimator for the bread of sandwiches.

Usage

bread(x, ...)

Arguments

x a fitted model object.
... arguments passed to methods.

Value

A matrix containing an estimator for the expectation of the negative derivative of the estimating functions. Typically, this should be an k x k matrix corresponding to k parameters. The rows and columns should be named as in coef or terms, respectively.

References

Zeileis A (2006), Object-oriented Computation of Sandwich Estimators. Package vignette.

See Also

lm, glm

Examples

x <- sin(1:10)
y <- rnorm(10)
fm <- lm(y ~ x)

bread(fm)
solve(crossprod(cbind(1, x))) * 10

[Package sandwich version 1.1-1 Index]