reghdfe | R Documentation |
reghdfe
returns the fixest object consisting of the regression equation.
reghdfe( data, outcome, explanatory_vars, fixed_effects = NULL, cluster, weights = NULL )
data |
tibble or dataframe. |
outcome |
outcome of interest. Must be a string. |
explanatory_vars |
vector of explanatory variables. Must be a string. |
fixed_effects |
a vector of fixed effects. Must be a string. Defaults to NULL for no fixed effects. |
cluster |
column to cluster by. Must be a string. |
weights |
column to weight by. |
This function calls the fixest::feols() function, but simiplifies the typing.
reghdfe(mtcars, "mpg", "hp", "am", "am")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.