arpoon.rfixest.Fixest.feglm(fml: str, family: str = 'gaussian', vcov: str = None, weights: str = None, offset=None, subset=None, split: str = None, fsplit: str = None, split_keep=None, split_drop=None, cluster: list | str = None, ssc: dict = None, panel_id=None, fixef=None, fixef_rm: 'perfect' | 'singleton' | 'both' | 'none' = 'perfect', fixef_tol: int = 1e-06, fixef_iter: int = 10000, collin_tol: int = 1e-10, nthreads: int = None, lean: bool = False, verbose: int = 0, warn: bool = True, notes=None, only_coef: bool = False, combine_quick=None, mem_clean: bool = False, only_env: bool = False, env=None, start=None, etastart=None, mustart=None, glm_iter: int = None, glm_tol: int = None, *, name: str = None, keep_est: bool = True) FixestGLM

Estimates GLM models with any number of fixed-effects, by calling r-fixest feglm

Example (continued): gravity ols

Example continued from arpoon.rfixest.Fixest

In [1]: pois = fixest.feglm(
   ...:     "Euros ~ log(dist_km) | Origin + Destination + Product + Year",
   ...:     family="poisson",
   ...: )
   ...: 

In [2]: pois
Out[2]: 
GLM estimation, family = poisson, Dep. Var.: Euros
Observations: 38,325
Fixed-effects: Origin: 15,  Destination: 15,  Product: 20,  Year: 10
Standard-errors: Clustered (Origin) 
             Estimate Std. Error z value  Pr(>|z|)    
log(dist_km) -1.52787   0.115678 -13.208 < 2.2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Log-Likelihood: -7.025e+11   Adj. Pseudo R2: 0.764032
           BIC:  1.405e+12     Squared Cor.: 0.612021

Now the Fixest object has a cache which stores the estimations

In [3]: fixest
Out[3]: Fixest

In [4]: etable = fixest.etable()
                           model 1
Dependent Var.:              Euros
                                  
log(dist_km)    -1.528*** (0.1157)
Fixed-Effects:  ------------------
Origin                         Yes
Destination                    Yes
Product                        Yes
Year                           Yes
_______________ __________________
S.E.: Clustered         by: Origin
Observations                38,325
Squared Cor.               0.61202
Pseudo R2                  0.76403
BIC                        1.4e+12
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

In [5]: etable
Out[5]: 
shape: (14, 2)
┌─────────────────┬────────────────────┐
│ info            ┆ feglm_poisson.0    │
│ ---             ┆ ---                │
│ str             ┆ str                │
╞═════════════════╪════════════════════╡
│ Dependent Var.: ┆ Euros              │
│                 ┆                    │
│ log(dist_km)    ┆ -1.528*** (0.1157) │
│ Fixed-Effects:  ┆ ------------------ │
│ Origin          ┆ Yes                │
│ …               ┆ …                  │
│ S.E.: Clustered ┆ by: Origin         │
│ Observations    ┆ 38,325             │
│ Squared Cor.    ┆ 0.61202            │
│ Pseudo R2       ┆ 0.76403            │
│ BIC             ┆ 1.4e+12            │
└─────────────────┴────────────────────┘

In [6]: fixest.etable(tex=True)
\begingroup
\centering
\begin{tabular}{lc}
   \tabularnewline \midrule \midrule
   Dependent Variable: & Euros\\  
   Model:              & (1)\\  
   \midrule
   \emph{Variables}\\
   log(dist\_km)       & -1.528$^{***}$\\   
                       & (0.1157)\\   
   \midrule
   \emph{Fixed-effects}\\
   Origin              & Yes\\  
   Destination         & Yes\\  
   Product             & Yes\\  
   Year                & Yes\\  
   \midrule
   \emph{Fit statistics}\\
   Observations        & 38,325\\  
   Squared Correlation & 0.61202\\  
   Pseudo R$^2$        & 0.76403\\  
   BIC                 & $1.4\times 10^{12}$\\   
   \midrule \midrule
   \multicolumn{2}{l}{\emph{Clustered (Origin) standard-errors in parentheses}}\\
   \multicolumn{2}{l}{\emph{Signif. Codes: ***: 0.01, **: 0.05, *: 0.1}}\\
\end{tabular}
\par\endgroup
Out[6]: '\\begingroup\n\\centering\n\\begin{tabular}{lc}\n   \\tabularnewline \\midrule \\midrule\n   Dependent Variable: & Euros\\\\  \n   Model:              & (1)\\\\  \n   \\midrule\n   \\emph{Variables}\\\\\n   log(dist\\_km)       & -1.528$^{***}$\\\\   \n                       & (0.1157)\\\\   \n   \\midrule\n   \\emph{Fixed-effects}\\\\\n   Origin              & Yes\\\\  \n   Destination         & Yes\\\\  \n   Product             & Yes\\\\  \n   Year                & Yes\\\\  \n   \\midrule\n   \\emph{Fit statistics}\\\\\n   Observations        & 38,325\\\\  \n   Squared Correlation & 0.61202\\\\  \n   Pseudo R$^2$        & 0.76403\\\\  \n   BIC                 & $1.4\\times 10^{12}$\\\\   \n   \\midrule \\midrule\n   \\multicolumn{2}{l}{\\emph{Clustered (Origin) standard-errors in parentheses}}\\\\\n   \\multicolumn{2}{l}{\\emph{Signif. Codes: ***: 0.01, **: 0.05, *: 0.1}}\\\\\n\\end{tabular}\n\\par\\endgroup'