Extracts an element at the root of a fixest_multi object.

# S3 method for fixest_multi
$(x, name)

Arguments

x

A fixest_multi object, obtained from a fixest estimation leading to multiple results.

name

The name of the root element to select.

Value

It either returns a fixest_multi object or a fixest object it there is only one estimation associated to the root element.

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, cash-.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)

# Let's the results for the setosa species
res$setosa
#> Standard-errors: IID 
#> Expl. vars.: x1
#>             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 ***
#> ---
#> Expl. vars.: x1 + x2
#>             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    
#> ---
#> Expl. vars.: x1 + x2 + x3
#>             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    

# now for versicolor
etable(res$versicolor)
#>                             model 1            model 2            model 3
#> Sample (species)         versicolor         versicolor         versicolor
#> Dependent Var.:                   y                  y                  y
#>                                                                          
#> (Intercept)       3.540*** (0.5629)  2.116*** (0.4943)  1.896*** (0.5071)
#> x1               0.8651*** (0.2019)    0.2476 (0.1868)   0.3869. (0.2045)
#> x2                                  0.7356*** (0.1248) 0.9083*** (0.1654)
#> x3                                                       -0.6792 (0.4354)
#> ________________ __________________ __________________ __________________
#> S.E. type                       IID                IID                IID
#> Observations                     50                 50                 50
#> R2                          0.27658            0.58413            0.60503
#> Adj. R2                     0.26151            0.56644            0.57927
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1