View source: R/helper_starprep.R
commarobust | R Documentation |
Build lm_robust object from lm fit
commarobust(model, se_type = NULL, clusters = NULL, ci = TRUE, alpha = 0.05)
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. |
an lm_robust
object.
lmo <- lm(mpg ~ hp, data = mtcars)
# Default HC2
commarobust(lmo)
commarobust(lmo, se_type = "HC3")
commarobust(lmo, se_type = "stata", clusters = mtcars$carb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.