Closed mattysimonson closed 2 months ago
FYI on implementation: I'm using regex matching and it requires the specification of an additional argument, coefs.match
to "regex"
to preserve the legacy behavior by default. This only applies to plot_coefs()
/plot_summs()
; in the case of export_summs()
, I'm relying too much on an external package to process the coefficient names to be able to use the same approach.
Renaming (and filtering out) coefficients in
plot_summs()
andexport_summs()
is already straightforward, but it could be made less cumbersome through partial string matching. Consider your example from theplot_summs
documentationSupposed 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 remaneFrost
andMurder
then I would also want to rename the interaction the same way. This issue also applies toexport_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 complementary
drop_coefs argument` would help as well.All of this is inspired by the new
fixest
package'setable
function which makes including, excluding, and renaming very easy. See thekeep
,drop
,order
anddict
arguments: https://lrberge.github.io/fixest/reference/etable.html