clustered_se: Calculate clustered standard errors for lm model

Description Usage Arguments Value

Description

This is a flexible function that will calculate cluster-robust standard errors for an 'lm' object. This includes the standard, one-way clustered standard error (similar to Stata's 'cluster' option) and a "multi-way" clustered standard error, due to Cameron, Gelbach and Miller (2011)

Usage

1
clustered_se(data, model, clusterby)

Arguments

data

Dataframe object containing both model data and clusterby variables

model

lm object to calculate clustered standard errors for

clusterby

String or fomula indicating the column in 'data' to cluster on Use a string for one-way clustering. a formula to indicate multiway clustering (e.g. use '~ G + H' to a clustering using the G and H dimensions

Value

Named vector of clustered standard errors


mattdwebb/wildclusterboot documentation built on May 23, 2019, 3:08 p.m.