summary.fixest {fixest} | R Documentation |
fixest
object. Computes different types of standard errors.This function is similar to print.fixest
. It provides the table of coefficients along with other information on the fit of the estimation. It can compute different types of standard errors. The new variance covariance matrix is an object returned.
## S3 method for class 'fixest' summary(object, se, cluster, dof = TRUE, exact_dof = FALSE, forceCovariance = FALSE, keepBounded = FALSE, ...)
object |
A |
se |
Character scalar. Which kind of standard error should be computed: “standard”, “White”, “cluster”, “twoway”, “threeway” or “fourway”? By default if there are clusters in the estimation: |
cluster |
Tells how to cluster the standard-errors (if clustering is requested). Can be either a list of vectors, a character vector of variable names, a formula or an integer vector. Assume we want to perform 2-way clustering over |
dof |
Logical, default is |
exact_dof |
Logical, default is |
forceCovariance |
(Advanced users.) Logical, default is |
keepBounded |
(Advanced users – feNmlm with non-linear part and bounded coefficients only.) Logical, default is |
... |
Not currently used. |
It returns a fixest
object with:
cov.scaled |
The new variance-covariance matrix (computed according to the argument |
se |
The new standard-errors (computed according to the argument |
coeftable |
The table of coefficients with the new standard errors. |
Laurent Berge
See also the main estimation functions femlm
, feols
or feglm
. Use fixef.fixest
to extract the cluster coefficients, and the functions esttable
and esttex
to visualize the results of multiple estimations.
# Load trade data data(trade) # We estimate the effect of distance on trade (with 3 cluster effects) est_pois = femlm(Euros ~ log(dist_km)|Origin+Destination+Product, trade) # Comparing different types of standard errors sum_white = summary(est_pois, se = "white") sum_oneway = summary(est_pois, se = "cluster") sum_twoway = summary(est_pois, se = "twoway") sum_threeway = summary(est_pois, se = "threeway") esttable(sum_white, sum_oneway, sum_twoway, sum_threeway) # Alternative ways to cluster the SE: # two-way clustering: Destination and Product # (Note that arg. se = "twoway" is implicitly deduced from the argument cluster) summary(est_pois, cluster = c("Destination", "Product")) summary(est_pois, cluster = trade[, c("Destination", "Product")]) summary(est_pois, cluster = list(trade$Destination, trade$Product)) summary(est_pois, cluster = ~Destination+Product) # Since Destination and Product are used as fixed-effects, you can also use: summary(est_pois, cluster = 2:3)