# \donttest{
data(synth)
subgroup_synth <- list(
1:nrow(synth), which(synth$Sex == 0), which(synth$Sex == 1),
which(synth$Sex == 1 & synth$White == 0), which(synth$Sex == 1 & synth$White == 1)
)
sample_mcmc <- AiEvalmcmc(data = synth, n.mcmc = 10)
sample_apce <- CalAPCE(
data = synth, mcmc.re = sample_mcmc, subgroup = subgroup_synth,
burnin = 0
)
sample_fair <- CalFairness(sample_apce)
PlotFairness(sample_fair, y.max = 0.4, y.min = -0.4, r.labels = c(
"Safe", "Preventable 1",
"Preventable 2", "Preventable 3", "Risky"
))
# }
Run the code above in your browser using DataLab