Description Usage Arguments Value
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)
1 | clustered_se(data, model, clusterby)
|
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 |
Named vector of clustered standard errors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.