summary.femlm {FENmlm} | R Documentation |
Summary of a femlm
object. Computes different types of standard errors.
Description
This function is similar to print.femlm
. 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.
Usage
## S3 method for class 'femlm'
summary(object, se = c("standard", "white", "cluster",
"twoway", "threeway", "fourway"), cluster, dof_correction = FALSE,
forceCovariance = FALSE, keepBounded = FALSE, ...)
Arguments
object |
A femlm object. Obtained using |
se |
Character scalar. Which kind of standard error should be computed: “standard” (default), “White”, “cluster”, “twoway”, “threeway” or “fourway”? |
cluster |
A list of vectors. Used only if |
dof_correction |
Logical, default is |
forceCovariance |
(Advanced users.) Logical, default is |
keepBounded |
(Advanced users.) Logical, default is |
... |
Not currently used. |
Value
It returns a femlm
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. |
Author(s)
Laurent Berge
See Also
See also the main estimation function femlm
. Use getFE
to extract the cluster coefficients, and the functions res2table
and res2tex
to visualize the results of multiple estimations.
Examples
# 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")
res2table(sum_white, sum_oneway, sum_twoway, sum_threeway)
# Alternative ways to cluster the SE:
## Not run:
# two-way clustering: Destination and Product
summary(est_pois, se = "twoway", cluster = c("Destination", "Product"))
summary(est_pois, se = "twoway", cluster = list(trade$Destination, trade$Product))
## End(Not run)