Learn R Programming

panelsummary

panelsummary creates publication-quality regression tables that have multiple panels. Paneled regression tables are particularly useful for showing output for models that are estimated with multiple dependent variables. A simple call to panelsummary::panelsummary will create a regression table that can be viewed in the RStudio Viewer panel, be edited with kableExtra’s suite of customization functions, and be output to latex.

As of now, panelsummary is intended for use with the fixest package, although more model classes are planned. Please use the panelsummary::models_supported function to view a list of all model classes that are currently supported.

Installation

You can install the development version of panelsummary from GitHub with:

# install.packages("devtools")
devtools::install_github("michaeltopper1/panelsummary")

What makes panelsummary different?

panelsummary can easily create beautiful paneled tables without any manual editing:

Edit with kableExtra

One of the strongest cases to use panelsummary is that it returns a kableExtra object. This means that you can easily customize your table using kableExtra’s suite of functions with the pipe operator (|>).

Use modelsummary arguments

Under the hood, panelsummary::panelsummary calls modelsummary::modelsummary and inherits many of the same arguments. Some examples of arguments that are shared:

  • stars - indicate significance.
  • coef_map - subset, rename, and reorder coefficients.
  • coef_omit - use regular expressions to determine which coefficients should be omitted from the table.
  • gof_map - rename, reorder, and omit goodness-of-fit statistics.

Learn more!

To learn more about panelsummary, get started with the introductory vignette.

Copy Link

Version

Install

install.packages('panelsummary')

Monthly Downloads

207

Version

0.1.2.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Michael Topper

Last Published

August 16th, 2023

Functions in panelsummary (0.1.2.1)

models_supported

all models supported by panelsummary
panelsummary-package

panelsummary: Create Publication-Ready Regression Tables with Panels
remove_fe

removes all fixed effects except the final panel (for collapse_fe)
shift_means

shifts the custom glance means to above observations and renames
get_panel_indices_collapse

gets the indices of each of the breaks in the panel
create_panels_null

creates panel labels when the argument is null
clean_raw

Pass a panelsummary::panelsummary_raw dataframe into kableExtra::kbl() with typical defaults
connect_means

Merges the means to the modelsummary output dataframe
panelsummary

Create a regression table with multiple panels
add_panels

add panels to the regression table
panelsummary_raw

Create a regression data.frame to manually edit further
create_alignment

creates alignment of left, center, center, ...
check_class_fixest

Checks that the class of each regression is of the type "fixest"
get_means_fixest

Generates the mean of the dependent variable for each model
check_dimensions_match

check if the dimensions work
get_panel_indices

gets the row numbers for break points in the panels
change_to_lists

Changes all models passed into panelsummary into a list
create_column_names

creates the column names of (1), (2), ...
get_lpanel_fe

gets the number of fixed effects in the last panel for collapse_fe purposes
create_pretty_numbers

creates prettyNum with commas for anything larger than 1000
add_panels_cfe

add panels to the regression table for collapsed_fe = T
econ_stars

creates economics convention significance stars