modelsummary icon indicating copy to clipboard operation
modelsummary copied to clipboard

Slow modelsummary on simple feols from fixest objects (latest easystats)

Open astraetech opened this issue 4 months ago • 3 comments

Hi Vincent,

I was wondering if you could look into a problem processing feols from fixest with modelsummary? All of my feols take a lot of time. And the only thing i'm pulling out are the tstats. Here is the bench


bench::mark(modelsummary(est_list_1,  output = "flextable", estimate="{estimate}{stars}", fmt=3,
                            #shape = "cbind",
                            statistic = 'statistic', stars = c('*' = .1, '**' = .05, '***'=0.01),
                            gof_omit = 'DF|Deviance|R2 Adj.|AIC|BIC|R2 Within|R2 Pseudo|Log.Lik.',
                            coef_rename = coef_rename, rename=c("ret_mon_rf"="Ret"),
                            gof_map=gm,
                            add_rows=insert_row(est_list_1)
))
# A tibble: 1 × 13
  expression                         min median `itr/sec` mem_alloc `gc/sec` n_itr  n_gc total_time
  <bch:expr>                       <bch> <bch:>     <dbl> <bch:byt>    <dbl> <int> <dbl>   <bch:tm>
1 "modelsummary(est_list_1, outpu…   18s    18s    0.0556     381MB    0.389     1     7        18s
# ℹ 4 more variables: result <list>, memory <list>, time <list>, gc <list>
Warning message:
Some expressions had a GC in every iteration; so filtering is disabled. 

Unfortunately I can't attach my estimates list file due to privacy reasons. Can I send it to you?

Here are the versions:

> packageVersion("modelsummary")
[1] ‘2.2.0.1’
> packageVersion("easystats")
[1] ‘0.7.3.2’
> packageVersion("fixest")
[1] ‘0.12.1’

Thank you very much!

astraetech avatar Oct 04 '24 23:10 astraetech