texreg icon indicating copy to clipboard operation
texreg copied to clipboard

Reorder coefficients by regex

Open zauster opened this issue 8 years ago • 6 comments

Allow coefficients to be re-ordered by a vector of regex:

Eg: reorder.coef = c("^log", "^GDP", "^Population") would put all coefficients that start with "log" on top, then "GDP" and then "Population" coefficients.

Motivation: I routinely have model with some fixed effects and interactions, then I would have to calculate the number of created dummy variables and based on these I could reorder them.

zauster avatar Sep 13 '17 11:09 zauster

I would like to see this as well :)

Irazall avatar Oct 04 '22 21:10 Irazall

I'd be open to a pull request if anyone wants to give it a try. The relevant code fragments are the reorder function, potentially the lines in the texreg, screenreg etc functions that call the reorder function, and two places in the plotreg function, which handles reordering in a different way, I think.

leifeld avatar Jan 19 '23 17:01 leifeld

Yes, plotreg has its own way of reordering. I confirm that.

czucca avatar Jan 20 '23 11:01 czucca