I have a table that looks as follows:
$> all_specs
# A tibble: 24 x 8
term estimate std.error statistic p.value outcome type fe
<chr> <dbl> <dbl> <dbl> <dbl> <chr> <chr> <chr>
1 ratio_post 0.00144 0.000971 1.48 1.39e- 1 lambda_W data all
2 ratio_post 0.00912 0.000599 15.2 2.13e-52 lambda_W sim all
3 ratio_post -0.00670 0.000761 -8.81 1.26e-18 lambda_W data stay, home
4 ratio_post 0.000981 0.000839 1.17 2.42e- 1 lambda_W sim stay, home
5 ratio_post -0.00670 0.000761 -8.81 1.26e-18 lambda_W home home
6 ratio_post 0.000981 0.000839 1.17 2.42e- 1 lambda_W sim home
7 ratio_post 0.0000121 0.0000116 1.05 2.93e- 1 lambda_T data all
8 ratio_post 0.00100 0.000917 1.10 2.73e- 1 lambda_T sim all
9 ratio_post -0.0000159 0.00000863 -1.84 6.57e- 2 lambda_T data stay, home
10 ratio_post 0.000976 0.000651 1.50 1.34e- 1 lambda_T sim stay, home
I was hoping to use some sort of ggplot
-esque tool to get this data into a format that would look something like the left hand side being the "type" column, then below that I subset by "sim" and "data". Columns show the betas and ses for different specification.
It's hard for me to make a prototype table showing this, but maybe you get the idea.
I thought gt
would have this functionality but now I'm not so sure. Can someone help me understand what tool I could use for this?
EDIT: Here is a picture I drew of the table I would like to programmatically generate