commarobust {estimatr} | R Documentation |
Build lm_robust object from lm fit
Description
Build lm_robust object from lm fit
Usage
commarobust(model, se_type = NULL, clusters = NULL, ci = TRUE, alpha = 0.05)
Arguments
model |
an lm model object |
se_type |
The sort of standard error sought. If |
clusters |
A vector corresponding to the clusters in the data. |
ci |
logical. Whether to compute and return p-values and confidence intervals, TRUE by default. |
alpha |
The significance level, 0.05 by default. |
Value
an lm_robust
object.
Examples
lmo <- lm(mpg ~ hp, data = mtcars)
# Default HC2
commarobust(lmo)
commarobust(lmo, se_type = "HC3")
commarobust(lmo, se_type = "stata", clusters = mtcars$carb)
[Package estimatr version 1.0.4 Index]