Skip to contents

Extracts single elements from multiple fixest estimations.

Usage

# S3 method for fixest_multi
[[(x, i)

Arguments

x

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

i

An integer scalar. The identifier of the estimation to extract.

Value

A fixest object is returned.

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)

# The first estimation
res[[1]]
#> 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

# The second one, etc
res[[2]]
#> 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