Skip to contents

Extracts the results from a fixest_multi object and place them into a list.

Usage

# S3 method for fixest_multi
as.list(x, ...)

Arguments

x

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

...

Not currently used.

Value

Returns a list containing all the results of the multiple estimations.

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)

# All the results at once
as.list(res)
#> $`sample.var: species; sample: setosa; rhs: 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
#> 
#> $`sample.var: species; sample: setosa; rhs: 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
#> 
#> $`sample.var: species; sample: setosa; rhs: 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.var: species; sample: versicolor; rhs: 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
#> 
#> $`sample.var: species; sample: versicolor; rhs: 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
#> 
#> $`sample.var: species; sample: versicolor; rhs: 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.var: species; sample: virginica; rhs: 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
#> 
#> $`sample.var: species; sample: virginica; rhs: 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
#> 
#> $`sample.var: species; sample: virginica; rhs: 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
#>