Relevels a factor so that the category with the highest total weight (e.g., exposure) becomes the reference (first) level. This is useful in regression settings, where the first level of a factor is taken as the baseline. In insurance applications, the group with the largest exposure is often chosen as reference.
Value
A factor of the same length as x, with the reference level set
to the group with the largest weight.
References
Kaas, Rob & Goovaerts, Marc & Dhaene, Jan & Denuit, Michel. (2008). Modern Actuarial Risk Theory: Using R. doi:10.1007/978-3-540-70998-5.
