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, usually the Hessian. 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. Report 37, Department of Statistics and Mathematics, Wirtschaftsuniversität Wien, Research Report Series. http://epub.wu-wien.ac.at/

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.9-0 Index]