# subset trade flows to avoid fitting time warnings during check
set.seed(123)
trade_2006 <- trade_panel[trade_panel$year == 2006, ]
trade_2006 <- trade_2006[sample(nrow(trade_2006), 500), ]
trade_2006$trade <- ifelse(trade_2006$trade > 100, 1L, 0L)
# Fit 'feglm()'
mod <- feglm(trade ~ lang | year, trade_2006, family = binomial())
# Apply analytical bias correction
mod_bc <- bias_corr(mod)
summary(mod_bc)
Run the code above in your browser using DataLab