flextable icon indicating copy to clipboard operation
flextable copied to clipboard

Easily produce tables using several regression specifications

Open kendonB opened this issue 3 years ago • 2 comments

image

Consider the above table, the feature request is to build functionality to create tables like this. Features that I don't believe are available yet but would enable something like this is:

  • [ ] A function to replace as_flextable.lm that would create the regression output as a single column with standard errors below estimates.
    • [ ] Aligning the decimals between the coefficient-standard error pairs is possible but tedious. In Word and LaTeX, the best solution I know is to create one table environment for each pair, nested inside the larger table environment, then use the standard approach to align on decimal.
    • [ ] The function would allow for replacing groups of variables with a label (e.g. "9 Year-of-birth dummies") and value (e.g. "Yes").
  • [ ] A function to bind_cols two such flextables (possibly could work now with the merge functions).
    • [ ] The function would insert the em dash in columns where a variable is missing.

The package that can currently do some of this is stargazer. However, one loses the great flexibility and nice grammar of flextable when using that.

image

I'm quite keen to help out on this if it's something you're interested in but don't know where to start.

kendonB avatar Aug 15 '22 01:08 kendonB

related issue https://github.com/davidgohel/flextable/issues/278

kendonB avatar Aug 15 '22 22:08 kendonB

Not sure that I should try that, do you know modelsummary? It seems exactly what you are looking for

https://vincentarelbundock.github.io/modelsummary/

davidgohel avatar Sep 06 '22 13:09 davidgohel

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

github-actions[bot] avatar Apr 06 '23 05:04 github-actions[bot]