clustered_errors_lm: Computes a linear regression with clustered standard errors.

Description Usage Arguments Value Examples

View source: R/errors_lm.R

Description

Computes a linear regression with clustered standard errors.

Usage

1
clustered_errors_lm(df, model, cluster_predictor)

Arguments

df

A dataframe R will pull the variables from to run the regression

model

A model object of class "lm" or a valid formula.

cluster_predictor

An (unquoted) variable to cluster the standard errors by.

Value

A data frame of model estimates.

Examples

1
clustered_errors_lm(mtcars, mpg ~ hp + wt, cyl)

jameshasbany/fastlm documentation built on July 26, 2020, 9:40 a.m.