meat: Clustered meat matrix for a sandwich estimator

View source: R/sandwich.R

meatR Documentation

Clustered meat matrix for a sandwich estimator

Description

This meat function is an overloaded function of meat from the sandwich package which enables a clusters argument.

Usage

meat(x, adjust = FALSE, cluster = NULL, ...)

Arguments

x

a fitted model object.

adjust

See sandwich::meat. If a cluster is given, this argument is ignored as the adjustment is always used. The adjustment is

m/(m - 1) * (n - 1)/(n - k),

where n is the number of observations, k the number of estimated parameters, and m the number of clusters. Note that if there are no clusters (which can be thought of as each observation being its own cluster), m = n and this reduces to

n/(n-k),

the default in sandwich::meat. See Cameron, A Colin, and Douglas L Miller. 2010. "Robust Inference with Clustered Data." Working Papers, University adjustment used when clustering. of California, Department of Economics.

cluster

A vector identifying cluster membership

...

Additional arguments to sandwich::estfun.

Value

A meat matrix.

See Also

sandwich::meat


josherrickson/epb documentation built on July 6, 2023, 9:12 p.m.