setFixest_vcov | R Documentation |
This functions defines or extracts the default type of standard-errors to computed in
fixest
summary
, and vcov
.
setFixest_vcov(
no_FE = "iid",
one_FE = "cluster",
two_FE = "cluster",
panel = "cluster",
all = NULL,
reset = FALSE
)
getFixest_vcov()
no_FE |
Character scalar equal to either: |
one_FE |
Character scalar equal to either: |
two_FE |
Character scalar equal to either: |
panel |
Character scalar equal to either: |
all |
Character scalar equal to either: |
reset |
Logical, default is |
The function getFixest_vcov()
returns a list with three elements containing the default for
estimations i) without, ii) with one, or iii) with two or more fixed-effects.
# By default:
# - no fixed-effect (FE): standard
# - one or more FEs: cluster
# - panel: cluster on panel id
data(base_did)
est_no_FE = feols(y ~ x1, base_did)
est_one_FE = feols(y ~ x1 | id, base_did)
est_two_FE = feols(y ~ x1 | id + period, base_did)
est_panel = feols(y ~ x1 | id + period, base_did, panel.id = ~id + period)
etable(est_no_FE, est_one_FE, est_two_FE)
# Changing the default standard-errors
setFixest_vcov(no_FE = "hetero", one_FE = "iid",
two_FE = "twoway", panel = "drisc")
etable(est_no_FE, est_one_FE, est_two_FE, est_panel)
# Resetting the defaults
setFixest_vcov(reset = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.