evanjflack / bacondecomp

Bacon-Goodman decomposition for differences-in-differences with variation in treatment timing.
Other
46 stars 16 forks source link

Add fixest support for much faster calculations #79

Closed kylebutts closed 3 years ago

kylebutts commented 3 years ago

For a speed comparison:

# A tibble: 2 × 13
  expression      min   median `itr/sec` mem_alloc `gc/sec` n_itr  n_gc total_time result       memory                 time           gc              
  <bch:expr> <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl> <int> <dbl>   <bch:tm> <list>       <list>                 <list>         <list>          
1 fixest      143.1ms  158.7ms    6.26      80.3MB    2.09      3     1   479.28ms <df [4 × 5]> <Rprofmem [1,325 × 3]> <bench_tm [3]> <tibble [3 × 3]>
2 orig          31.8s    32.2s    0.0307   872.7MB    0.123     3    12      1.63m <df [4 × 5]> <Rprofmem [1,329 × 3]> <bench_tm [3]> <tibble [3 × 3]>
kylebutts commented 3 years ago

I did three more things:

  1. Add controls version
  2. Export bacon_summary which is just print_summary but now with a more user-facing name
  3. Update README to show that as well
evanjflack commented 3 years ago

Awesome! Just approved the tests to run (didn't know I had to do that, sorry).

kylebutts commented 3 years ago

hey! I'm not sure why R-CMD-check is failing. I think the github action is not working because pandoc is not installed, so maybe you have to update your action?

On my macbook, I'm getting a perfect CRAN check:

image
evanjflack commented 3 years ago

@kylebutts Yeah, I kept noticing that too. Not sure what is going on, let me check this afternoon!

evanjflack commented 3 years ago

All of this was merged with #80. Thanks @kylebutts!