Summary information for fixest_multi objects. In particular, this is used to specify the type of standard-errors to be computed.
# S3 method for fixest_multi
summary(
object,
type = "short",
se = NULL,
cluster = NULL,
dof = NULL,
.vcov,
stage = 2,
lean = FALSE,
n,
...
)
A fixest_multi
object, obtained from a fixest
estimation leading to multiple results.
A character either equal to "short"
, "long"
, "compact"
, or "se_compact"
. If short
, only the table of coefficients is displayed for each estimation. If long
, then the full results are displayed for each estimation. If compact
, a data.frame
is returned with one line per model and the formatted coefficients + standard-errors in the columns. If se_compact
, a data.frame
is returned with one line per model, one numeric column for each coefficient and one numeric column for each standard-error.
Character scalar. Which kind of standard error should be computed: “standard”, “hetero”, “cluster”, “twoway”, “threeway” or “fourway”? By default if there are clusters in the estimation: se = "cluster"
, otherwise se = "standard"
. Note that this argument can be implicitly deduced from the argument 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 var1
and var2
contained in the data.frame base
used for the estimation. All the following cluster
arguments are valid and do the same thing: cluster = base[, c("var1", "var2")]
, cluster = c("var1", "var2")
, cluster = ~var1+var2
. If the two variables were used as clusters in the estimation, you could further use cluster = 1:2
or leave it blank with se = "twoway"
(assuming var1
[resp. var2
] was the 1st [res. 2nd] cluster). You can interact two variables using ^
with the following syntax: cluster = ~var1^var2
or cluster = "var1^var2"
.
An object of class dof.type
obtained with the function dof
. Represents how the degree of freedom correction should be done.You must use the function dof
for this argument. The arguments and defaults of the function dof
are: adj = TRUE
, fixef.K="nested"
, cluster.adj = TRUE
, cluster.df = "conventional"
, t.df = "conventional"
, fixef.force_exact=FALSE)
. See the help of the function dof
for details.
A user provided covariance matrix or a function computing this matrix. If a matrix, it must be a square matrix of the same number of rows as the number of variables estimated. If a function, it must return the previously mentioned matrix.
Can be equal to 2
(default), 1
, 1:2
or 2:1
. Only used if the object is an IV estimation: defines the stage to which summary
should be applied. If stage = 1
and there are multiple endogenous regressors or if stage
is of length 2, then an object of class fixest_multi
is returned.
Logical, default is FALSE
. Used to reduce the (memory) size of the summary object. If TRUE
, then all objects of length N (the number of observations) are removed from the result. Note that some fixest
methods may consequently not work when applied to the summary.
Integer, default is missing (means Inf). Number of coefficients to display when the print method is used.
Not currently used.
It returns either an object of class fixest_multi
(if type
equals short
or long
), either a data.frame
(if type equals compact
or se_compact
).
The main fixest estimation functions: feols
, fepois
, fenegbin
, feglm
, feNmlm
. Tools for mutliple fixest estimations: summary.fixest_multi
, print.fixest_multi
, as.list.fixest_multi
, sub-sub-.fixest_multi
, sub-.fixest_multi
, cash-.fixest_multi
.
# NOT RUN {
base = iris
names(base) = c("y", "x1", "x2", "x3", "species")
# Multiple estimation
res = feols(y ~ csw(x1, x2, x3), base, split = ~species)
# By default, the type is "short"
# You can stil use the arguments from summary.fixest
summary(res, cluster = ~ species)
summary(res, type = "long")
summary(res, type = "compact")
summary(res, type = "se_compact")
# }
Run the code above in your browser using DataLab