MyNixOS website logo
Description

Experimental Evaluation of Algorithm-Assisted Human Decision-Making.

Provides statistical methods for analyzing experimental evaluation of the causal impacts of algorithmic recommendations on human decisions developed by Imai, Jiang, Greiner, Halen, and Shin (2023) <doi:10.1093/jrsssa/qnad010>. The data used for this paper, and made available here, are interim, based on only half of the observations in the study and (for those observations) only half of the study follow-up period. We use them only to illustrate methods, not to draw substantive conclusions.

aihuman

R-CMD-check

Overview

aihuman provides statistical methods for analyzing experimental evaluation of the causal impacts of algorithmic recommendations on human decisions developed by Imai, Jiang, Greiner, Halen, and Shin (2023).

The data used for this paper, and made available here, are interim, based on only half of the observations in the study and (for those observations) only half of the study follow-up period. We use them only to illustrate methods, not to draw substantive conclusions.

Installation

You can install the development version of aihuman from GitHub with:

# install.packages("devtools")
devtools::install_github("sooahnshin/aihuman")

Usage

The main functions in this package are as follows:

CategoryFunctionTypeMain InputOutputPaperNotes
descriptivePlotStackedBar()vis.e.g., data(psa_synth)ggplotFig 1dist. of $D_i$
descriptiveCalDIMsubgroup()est.e.g., data(synth)dataframeSec 2.4diff-in-means
descriptivePlotDIMdecisions()vis.output of CalDIMsubgroup()ggplotFig 2 (left)
descriptivePlotDIMoutcomes()vis.output of CalDIMsubgroup() for each outcomeggplotFig 2 (right)
mainAiEvalmcmc()est.(c/h)e.g., data(synth)mcmcSec S5
mainCalAPCE()est.(c/h)output of PSAmcmc()listSec 3.4
mainAPCEsummary()est.output of CalAPCE()dataframeSec 3.4APCE
mainPlotAPCE()vis.output of APCEsummary()ggplotFig 4
strataCalPS()est.$P.R.mcmc of CalAPCE()dataframeEq 6$e_r$
strataPlotPS()vis.output of CalPS()ggplotFig 3
fairnessCalFairness()est.output of CalAPCE()dataframeSec 3.6$\Delta_r(z)$
fairnessPlotFairness()est.output of CalFairness()ggplotFig 5
optimalCalOptimalDecision()est.output of AiEvalmcmc()dataframeSec 3.7$\delta^\ast(\mathbf{x})$
optimalPlotOptimalDecision()vis.output of CalOptimalDecision()ggplotFig 6
comparisonPlotUtilityDiff()vis.output of CalOptimalDecision()ggplotFig 7$g_d(\mathbf{x})$
comparisonPlotUtilityDiffCI()vis.output of CalOptimalDecision()ggplotFig S17
crtSpilloverCRT()est.court event hearing date, $D_i$, $Z_i$daraframeSec S3.1
crtPlotSpilloverCRT()vis.output of SpilloverCRT()ggplotFig S8
crt powerSpilloverCRTpower()est.court event hearing date, $D_i$, $Z_i$dataframeSec S3.2
crt powerPlotSpilloverCRTpower()vis.output of SpilloverCRTpower()ggplotFig S9
frequentistCalAPCEipw()est.e.g., data(synth)dataframeSec S7
frequentistBootstrapAPCEipw()est.e.g., data(synth)dataframe
frequentistAPCEsummaryipw()est.outputs of CalAPCEipw() and BootstrapAPCEipw()dataframe
frequentist (RE)CalAPCEipwRE()est.e.g., data(synth)dataframe
frequentist (RE)BootstrapAPCEipwRE()est.e.g., data(synth)dataframe

vis. = visualization; est. = estimation; c/h = computation-heavy. You may use CalAPCEparallel() instead of CalAPCE() throughout the analysis.

For more details see the aihuman package vignette, vignette("aihuman", package = "aihuman").

Example

library(aihuman)
## Using synthetic data with small run
data(synth)
sample_mcmc = AiEvalmcmc(data = synth, n.mcmc = 10)
#> 10/10 done.
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_apce = CalAPCE(data = synth, 
                      mcmc.re = sample_mcmc, 
                      subgroup = subgroup_synth)
# You can also use the parallelized version: check CalAPCEparallel()
sample_apce_summary = APCEsummary(sample_apce[["APCE.mcmc"]])
PlotAPCE(sample_apce_summary, 
         y.max = 0.25, 
         decision.labels = c("signature","small cash","middle cash","large cash"), 
         shape.values = c(16, 17, 15, 18), 
         col.values = c("blue", "black", "red", "brown", "purple"), 
         label = FALSE)
Metadata

Version

0.1.0

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows