Skip to contents

This function generates a publication table from a list of tidy summaries to be exported or copy-pasted (e.g. into Excel). The table shows all coefficients in the 'term' column with significance level:

  • ***p < .001

  • **p < .01

  • *p < .05

  • +p < .10

Each column is a different outcome variable/tidy summary, each row is a different predictor.

Usage

make_pub_table_from_broom_tidy(ana, transpose = FALSE)

Arguments

ana

list of tidy summaries

transpose

(logical) whether to transpose the table (default FALSE)

Value

data.frame with predictors and coefficients (and significance level) in each model

Examples

library(broom)
ana <- list()
ana$y1 <- lm(y1 ~ x1+x2, df) |> tidy()
ana$y2 <- lm(y2 ~ x1+x2, df) |> tidy()
ana |> make_pub_table_from_broom_tidy()
#>     Predictor      y1      y2
#> 1 (Intercept)    0.01   -0.01
#> 2          x1 0.58*** 0.25***
#> 3          x2 0.17*** 0.72***