Ordinary Least Squares with Robust Standard Errors

lm_robust(formula, data, weights, subset, clusters, se_type = NULL, ci = TRUE, alpha = 0.05, coefficient_name = NULL, return_vcov = TRUE)

formula | an object of class formula, as in |
---|---|

data | A data.frame. |

weights | the bare (unquoted) names of the weights variable in the supplied data. |

subset | An optional bare (unquoted) expression specifying a subset of observations to be used. |

clusters | An optional bare (unquoted) name of the variable that corresponds to the clusters in the data. |

se_type | The sort of standard error sought. Without clustering: "HC0", "HC1", "HC2" (default), "HC3", or "classical". With clustering: "CR2" (default), "stata". |

ci | A boolean for whether to compute and return pvalues and confidence intervals, TRUE by default. |

alpha | The significance level, 0.05 by default. |

coefficient_name | a character or character vector that indicates which coefficients should be reported. If left unspecified, returns all coefficients. |

return_vcov | a boolean for whether to return the vcov matrix for later usage, TRUE by default. |