Summary information for fixest_multi objects. In particular, this is used to specify the type of standard-errors to be computed.
Usage
# S3 method for class 'fixest_multi'
summary(
object,
type = "etable",
vcov = NULL,
se = NULL,
cluster = NULL,
ssc = NULL,
stage = 2,
lean = FALSE,
n = 1000,
...
)Arguments
- object
A
fixest_multiobject, obtained from afixestestimation leading to multiple results.- type
A character either equal to
"etable","short","long","compact","se_compact"or"se_long". Ifetable, the functionetableis used to print the result. Ifshort, only the table of coefficients is displayed for each estimation. Iflong, then the full results are displayed for each estimation. Ifcompact, adata.frameis returned with one line per model and the formatted coefficients + standard-errors in the columns. Ifse_compact, adata.frameis returned with one line per model, one numeric column for each coefficient and one numeric column for each standard-error. If"se_long", same as"se_compact"but the data is in a long format instead of wide.- vcov
Versatile argument to specify the VCOV. In general, it is either a character scalar equal to a VCOV type, either a formula of the form:
vcov_type ~ variables. The VCOV types implemented are: "iid", "hetero" (or "HC1"), "cluster", "twoway", "NW" (or "newey_west"), "DK" (or "driscoll_kraay"), and "conley". It also accepts object fromvcov_cluster,vcov_NW,NW,vcov_DK,DK,vcov_conleyandconley. It also accepts covariance matrices computed externally. Finally it accepts functions to compute the covariances. See thevcovdocumentation in the vignette.- se
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", otherwisese = "iid". Note that this argument is deprecated, you should usevcovinstead.- 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
var1andvar2contained in the data.framebaseused for the estimation. All the followingclusterarguments 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 fixed-effects in the estimation, you can leave it blank withvcov = "twoway"(assumingvar1[resp.var2] was the 1st [resp. 2nd] fixed-effect). You can interact two variables using^with the following syntax:cluster = ~var1^var2orcluster = "var1^var2".- ssc
An object of class
ssc.typeobtained with the functionssc. Represents how the degree of freedom correction should be done.You must use the functionsscfor this argument. The arguments and defaults of the functionsscare:K.adj = TRUE,K.fixef = "nonnested",G.adj = TRUE,G.df = "min",t.df = "min",K.exact = FALSE). See the help of the functionsscfor details.- stage
Can be equal to
2(default),1,1:2or2:1. Only used if the object is an IV estimation: defines the stage to whichsummaryshould be applied. Ifstage = 1and there are multiple endogenous regressors or ifstageis of length 2, then an object of classfixest_multiis returned.- lean
Logical, default is
FALSE. Used to reduce the (memory) size of the summary object. IfTRUE, then all objects of length N (the number of observations) are removed from the result. Note that somefixestmethods may consequently not work when applied to the summary.- n
Integer, default is 1000. Number of coefficients to display when the print method is used.
- ...
Not currently used.
Value
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).
See also
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.
Examples
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 "etable"
# You can still use the arguments from summary.fixest
summary(res, se = "hetero")
#> x.1 x.2 x.3
#> Sample (species) setosa setosa setosa
#> Dependent Var.: y y y
#>
#> Constant 2.639*** (0.2986) 2.304*** (0.4336) 2.352*** (0.4372)
#> x1 0.6905*** (0.0859) 0.6674*** (0.0922) 0.6548*** (0.0925)
#> x2 0.2834 (0.2648) 0.2376 (0.2753)
#> x3 0.2521 (0.2846)
#> ________________ __________________ __________________ __________________
#> S.E. type Heteroskedas.-rob. Heteroskedas.-rob. Heteroskedas.-rob.
#> Observations 50 50 50
#> R2 0.55138 0.57026 0.57514
#> Adj. R2 0.54203 0.55197 0.54743
#>
#> x.4 x.5 x.6
#> Sample (species) versicolor versicolor versicolor
#> Dependent Var.: y y y
#>
#> Constant 3.540*** (0.6170) 2.116*** (0.4313) 1.896*** (0.4343)
#> x1 0.8651*** (0.2207) 0.2476 (0.1765) 0.3869. (0.2071)
#> x2 0.7356*** (0.1114) 0.9083*** (0.1598)
#> x3 -0.6792 (0.4366)
#> ________________ __________________ __________________ __________________
#> S.E. type Heteroskedas.-rob. Heteroskedas.-rob. Heteroskedas.-rob.
#> Observations 50 50 50
#> R2 0.27658 0.58413 0.60503
#> Adj. R2 0.26151 0.56644 0.57927
#>
#> x.7 x.8 x.9
#> Sample (species) virginica virginica virginica
#> Dependent Var.: y y y
#>
#> Constant 3.907*** (0.7607) 0.6248 (0.5381) 0.6999 (0.5534)
#> x1 0.9015*** (0.2462) 0.2600. (0.1302) 0.3303** (0.1225)
#> x2 0.9348*** (0.0770) 0.9455*** (0.0809)
#> x3 -0.1698 (0.2103)
#> ________________ __________________ __________________ __________________
#> S.E. type Heteroskedas.-rob. Heteroskedas.-rob. Heteroskedas.-rob.
#> Observations 50 50 50
#> R2 0.20906 0.76147 0.76522
#> Adj. R2 0.19258 0.75132 0.74991
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(res, type = "long")
#>
#> ### Sample: setosa
#>
#> Expl. vars.: x1
#> OLS estimation, Dep. Var.: y
#> Observations: 50
#> Sample (species): setosa
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 2.639001 0.310014 8.51251 3.7424e-11 ***
#> x1 0.690490 0.089899 7.68074 6.7098e-10 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 0.233723 Adj. R2: 0.542029
#>
#> Expl. vars.: x1 + x2
#> OLS estimation, Dep. Var.: y
#> Observations: 50
#> Sample (species): setosa
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 2.303738 0.385294 5.97917 2.8943e-07 ***
#> x1 0.667416 0.090356 7.38653 2.1252e-09 ***
#> x2 0.283419 0.197224 1.43704 1.5733e-01
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 0.228751 Adj. R2: 0.551971
#>
#> Expl. vars.: x1 + x2 + x3
#> OLS estimation, Dep. Var.: y
#> Observations: 50
#> Sample (species): setosa
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 2.351890 0.392868 5.986471 3.0342e-07 ***
#> x1 0.654835 0.092447 7.083324 6.8344e-09 ***
#> x2 0.237560 0.208019 1.142011 2.5936e-01
#> x3 0.252126 0.346864 0.726873 4.7099e-01
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 0.227449 Adj. R2: 0.547429
#>
#> ### Sample: versicolor
#>
#> Expl. vars.: x1
#> OLS estimation, Dep. Var.: y
#> Observations: 50
#> Sample (species): versicolor
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 3.539735 0.562874 6.28869 9.0690e-08 ***
#> x1 0.865078 0.201938 4.28389 8.7719e-05 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 0.434612 Adj. R2: 0.261511
#>
#> Expl. vars.: x1 + x2
#> OLS estimation, Dep. Var.: y
#> Observations: 50
#> Sample (species): versicolor
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 2.116431 0.494256 4.28206 9.0640e-05 ***
#> x1 0.247642 0.186839 1.32543 1.9144e-01
#> x2 0.735587 0.124768 5.89565 3.8707e-07 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 0.329521 Adj. R2: 0.566438
#>
#> Expl. vars.: x1 + x2 + x3
#> OLS estimation, Dep. Var.: y
#> Observations: 50
#> Sample (species): versicolor
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 1.895540 0.507055 3.73833 5.1122e-04 ***
#> x1 0.386858 0.204545 1.89131 6.4890e-02 .
#> x2 0.908337 0.165432 5.49068 1.6667e-06 ***
#> x3 -0.679224 0.435382 -1.56006 1.2560e-01
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 0.321135 Adj. R2: 0.579273
#>
#> ### Sample: virginica
#>
#> Expl. vars.: x1
#> OLS estimation, Dep. Var.: y
#> Observations: 50
#> Sample (species): virginica
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 3.906836 0.757061 5.16053 4.6563e-06 ***
#> x1 0.901534 0.253106 3.56189 8.4346e-04 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 0.559836 Adj. R2: 0.192579
#>
#> Expl. vars.: x1 + x2
#> OLS estimation, Dep. Var.: y
#> Observations: 50
#> Sample (species): virginica
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.624782 0.524867 1.19036 2.3988e-01
#> x1 0.259954 0.153338 1.69531 9.6634e-02 .
#> x2 0.934819 0.089602 10.43302 8.0094e-14 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 0.307439 Adj. R2: 0.75132
#>
#> Expl. vars.: x1 + x2 + x3
#> OLS estimation, Dep. Var.: y
#> Observations: 50
#> Sample (species): virginica
#> Standard-errors: IID
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 0.699883 0.533601 1.311623 1.9616e-01
#> x1 0.330337 0.174329 1.894909 6.4400e-02 .
#> x2 0.945536 0.090722 10.422336 1.0743e-13 ***
#> x3 -0.169753 0.198072 -0.857023 3.9587e-01
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> RMSE: 0.305014 Adj. R2: 0.749908
summary(res, type = "compact")
#> lhs sample rhs (Intercept) x1 x2
#> 1 y setosa x1 2.64*** (0.310) 0.690*** (0.090)
#> 2 y setosa x1 + x2 2.30*** (0.385) 0.667*** (0.090) 0.283 (0.197)
#> 3 y setosa x1 + x2 + x3 2.35*** (0.393) 0.655*** (0.092) 0.238 (0.208)
#> 4 y versicolor x1 3.54*** (0.563) 0.865*** (0.202)
#> 5 y versicolor x1 + x2 2.12*** (0.494) 0.248 (0.187) 0.736*** (0.125)
#> 6 y versicolor x1 + x2 + x3 1.90*** (0.507) 0.387. (0.205) 0.908*** (0.165)
#> 7 y virginica x1 3.91*** (0.757) 0.902*** (0.253)
#> 8 y virginica x1 + x2 0.625 (0.525) 0.260. (0.153) 0.935*** (0.090)
#> 9 y virginica x1 + x2 + x3 0.700 (0.534) 0.330. (0.174) 0.946*** (0.091)
#> x3
#> 1
#> 2
#> 3 0.252 (0.347)
#> 4
#> 5
#> 6 -0.679 (0.435)
#> 7
#> 8
#> 9 -0.170 (0.198)
summary(res, type = "se_compact")
#> lhs sample rhs (Intercept) (Intercept)__se x1 x1__se
#> 1 y setosa x1 2.6390012 0.3100143 0.6904897 0.08989888
#> 2 y setosa x1 + x2 2.3037382 0.3852942 0.6674162 0.09035581
#> 3 y setosa x1 + x2 + x3 2.3518898 0.3928675 0.6548350 0.09244742
#> 4 y versicolor x1 3.5397347 0.5628736 0.8650777 0.20193757
#> 5 y versicolor x1 + x2 2.1164314 0.4942556 0.2476422 0.18683892
#> 6 y versicolor x1 + x2 + x3 1.8955395 0.5070552 0.3868576 0.20454490
#> 7 y virginica x1 3.9068365 0.7570605 0.9015345 0.25310551
#> 8 y virginica x1 + x2 0.6247824 0.5248675 0.2599540 0.15333757
#> 9 y virginica x1 + x2 + x3 0.6998830 0.5336009 0.3303370 0.17432873
#> x2 x2__se x3 x3__se
#> 1 NA NA NA NA
#> 2 0.2834193 0.19722377 NA NA
#> 3 0.2375602 0.20801921 0.2521257 0.3468636
#> 4 NA NA NA NA
#> 5 0.7355868 0.12476776 NA NA
#> 6 0.9083370 0.16543248 -0.6792238 0.4353821
#> 7 NA NA NA NA
#> 8 0.9348189 0.08960197 NA NA
#> 9 0.9455356 0.09072204 -0.1697527 0.1980724
summary(res, type = "se_long")
#> lhs sample rhs type (Intercept) x1 x2
#> 1 y setosa x1 coef 2.6390012 0.69048972 NA
#> 2 y setosa x1 se 0.3100143 0.08989888 NA
#> 3 y setosa x1 + x2 coef 2.3037382 0.66741621 0.28341929
#> 4 y setosa x1 + x2 se 0.3852942 0.09035581 0.19722377
#> 5 y setosa x1 + x2 + x3 coef 2.3518898 0.65483497 0.23756017
#> 6 y setosa x1 + x2 + x3 se 0.3928675 0.09244742 0.20801921
#> 7 y versicolor x1 coef 3.5397347 0.86507772 NA
#> 8 y versicolor x1 se 0.5628736 0.20193757 NA
#> 9 y versicolor x1 + x2 coef 2.1164314 0.24764216 0.73558681
#> 10 y versicolor x1 + x2 se 0.4942556 0.18683892 0.12476776
#> 11 y versicolor x1 + x2 + x3 coef 1.8955395 0.38685762 0.90833700
#> 12 y versicolor x1 + x2 + x3 se 0.5070552 0.20454490 0.16543248
#> 13 y virginica x1 coef 3.9068365 0.90153448 NA
#> 14 y virginica x1 se 0.7570605 0.25310551 NA
#> 15 y virginica x1 + x2 coef 0.6247824 0.25995398 0.93481889
#> 16 y virginica x1 + x2 se 0.5248675 0.15333757 0.08960197
#> 17 y virginica x1 + x2 + x3 coef 0.6998830 0.33033703 0.94553559
#> 18 y virginica x1 + x2 + x3 se 0.5336009 0.17432873 0.09072204
#> x3
#> 1 NA
#> 2 NA
#> 3 NA
#> 4 NA
#> 5 0.2521257
#> 6 0.3468636
#> 7 NA
#> 8 NA
#> 9 NA
#> 10 NA
#> 11 -0.6792238
#> 12 0.4353821
#> 13 NA
#> 14 NA
#> 15 NA
#> 16 NA
#> 17 -0.1697527
#> 18 0.1980724