In displaying fixed effects regressions from fixest
with modelsummary
, I want to remove the default stats of AIC and BIC, and keep only the FE variable and the sample size, in that order.
I don't know how to refer to the "FE:[Variable] X" stat in modelsummary. Is that a gof
statistic? It doesn't show up in modelsummary::gof_map
. I'd rather not use regex as in gof_omit
since it is harder to teach.
Here I attempted gof_map = c("nobs", "FE")
but that didn't work.
library(modelsummary)
library(fixest)
library(readr)
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/HistData/Guerry.csv'
dat <- read_csv(url)
# want to only keep FE and N, in that order
modelsummary(feols(Literacy ~ Wealth | Region, dat),
gof_map = c("FE", "nobs"),
output = "markdown")
#> NOTE: 1 observation removed because of NA values (Fixed-effects: 1).
Model 1 | |
---|---|
Wealth | -0.113 |
(0.071) | |
Num.Obs. | 85 |
# FE does not show up
Created on 2022-10-06 by the reprex package (v2.0.1)