A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jacob-long/jtools/issues/122 below:

Rename terms using partial string matching · Issue #122 · jacob-long/jtools · GitHub

Renaming (and filtering out) coefficients in plot_summs() and export_summs() is already straightforward, but it could be made less cumbersome through partial string matching. Consider your example from the plot_summs documentation

plot_summs(fit1, fit2, fit3,
           coefs = c("Frost Days" = "Frost", "% Illiterate" = "Illiteracy",
                     "Murder Rate" = "Murder"),
           scale = TRUE, robust = TRUE)

Supposed now the model contained Frost * Murder. I would have to type in "Frost Days x Murder Rate" = "Frost:Murder" for the interaction. Ideally, though, plot_summs would recognize that if I wanted to remane Frost and Murder then I would also want to rename the interaction the same way. This issue also applies to export_summs.

(one complication is that interaction terms often require a linebreak after the x symbol in order to comfortably fit in a plot without blowing up the labeling area)

Aside from interactions, partial string matching would be a useful feature in the event that I simply had a lot of variables I wanted in include with similar names. If my data contained region_north, region_west, region_south, and region_east, it would be great if I could type coef = "region"to catch them all. A complementarydrop_coefs argument` would help as well.

All of this is inspired by the new fixest package's etable function which makes including, excluding, and renaming very easy. See the keep, drop, order and dict arguments: https://lrberge.github.io/fixest/reference/etable.html


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4