"Methods for Quantifying Discriminatory Effects on Protected Classes in Insurance"

 The CAS paper "Methods for Quantifying Discriminatory Effects on Protected Classes in Insurance" by Mosley and Wenman is a ground-breaking work.

 I'm sure many actuaries have been working through the authors' examples to understand them.

 Would someone kindly share the R-code they used to recreate Figure 3 (Bias detection metrics for GLM with area) and Figure 4 (GLM average predictions by area)? 

 I have loaded datasets fremotor1freq0304a, b and c, and library(fairmodels).  At the moment I am stuck on the reweighting.

 Thank you.
1 Like

Hi. I find this online community helpful in people sharing their expertise. I am surprised to have received no offers of assistance. Is this because many people have tried to recreate the examples and were unsuccessful, or is this because I am the only one who has tried?

I haven’t had time to try it out.

Hi.

Please see my original post, above, from September. I am trying to use R to recreate figures 3 and 4 in “Methods for Quantifying Discriminatory Effects on Protected Classes in Insurance” by Mosley and Wenman. Has anyone successfully done so, and if so would you be willing to share the R code? Or am I the only one who has tried to do this?

Thank you.

If you are wondering what happened with this task, I got to a point where even after deleting all unnecessary objects from my RStudio environment, I received an error message
Error: cannot allocate vector of size 17.0 Gb.

I believe my computer has 8 GB. So even adding another 8 is not going to be enough. It is time to say farewell to this task…

If your existing computer can’t support 32GB of RAM…

I haven’t tried these little Beelinks with heavy lifting in R, but I’ve been pleased with the couple I’ve acquired for various automation projects.

The price showing for me on Amazon is $329, not $399. There are many, many different configurations available; this was just the lowest-price one with 32GB of RAM I could quickly find.

Wow, I’m surprised it is so inexpensive. Thanks.

Geez, how old is your PC?