Package: aihuman 1.0.0

Sooahn Shin

aihuman: 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> and Ben-Michael, Greiner, Huang, Imai, Jiang, and Shin (2024) <doi:10.48550/arXiv.2403.12108>. 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.

Authors:Sooahn Shin [aut, cre], Zhichao Jiang [aut], Kosuke Imai [aut]

aihuman_1.0.0.tar.gz
aihuman_1.0.0.tar.gz(r-4.5-noble)aihuman_1.0.0.tar.gz(r-4.4-noble)
aihuman_1.0.0.tgz(r-4.4-emscripten)aihuman_1.0.0.tgz(r-4.3-emscripten)
aihuman.pdf |aihuman.html
aihuman/json (API)
NEWS

# Install 'aihuman' in R:
install.packages('aihuman', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/sooahnshin/aihuman/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • FTAdata - Interim Dane data with failure to appear (FTA) as an outcome
  • HearingDate - Interim court event hearing date
  • NCAdata - Interim Dane data with new criminal activity (NCA) as an outcome
  • NVCAdata - Interim Dane data with new violent criminal activity (NVCA) as an outcome
  • PSAdata - Interim Dane PSA data
  • hearingdate_synth - Synthetic court event hearing date
  • psa_synth - Synthetic PSA data
  • synth - Synthetic data

openblascppopenmp

3.00 score 8 scripts 222 downloads 60 exports 74 dependencies

Last updated 23 days agofrom:b479bfbac9. Checks:2 OK. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKJan 09 2025
R-4.5-linux-x86_64OKJan 09 2025

Exports:A_llamaAiEvalmcmcAPCEsummaryAPCEsummaryipwBootstrapAPCEipwBootstrapAPCEipwREBootstrapAPCEipwREparallelCalAPCECalAPCEipwCalAPCEipwRECalAPCEparallelCalDeltaCalDIMCalDIMsubgroupCalFairnessCalOptimalDecisionCalPScompute_bounds_aipwcompute_nuisance_functionscompute_nuisance_functions_aicompute_statscompute_stats_agreementcompute_stats_aipwcompute_stats_subgroupcrossfitg_legendnca_follow_policynca_follow_policy_decnca_provide_policynca_provide_policy_decnuis_funcnuis_func_aiplot_agreementplot_diff_ai_aipwplot_diff_humanplot_diff_human_aipwplot_diff_subgroupplot_preferencePlotAPCEPlotDIMdecisionsPlotDIMoutcomesPlotFairnessPlotOptimalDecisionPlotPSPlotSpilloverCRTPlotSpilloverCRTpowerPlotStackedBarPlotStackedBarDMFPlotUtilityDiffPlotUtilityDiffCISpilloverCRTSpilloverCRTpowertable_agreementTestMonotonicityTestMonotonicityREvis_agreementvis_diff_aivis_diff_humanvis_diff_subgroupvis_preference

Dependencies:abindbackportscachemcheckmateclassclassIntclicodacodetoolscolorspacecpp11data.tableDBIdigestdoParalleldplyre1071fansifarverfastmapforcatsforeachFormulaformula.toolsgbmgenericsggplot2GLMMadaptivegluegtableisobanditeratorsKernSmoothlabelinglatticelifecyclelubridatemagrittrMASSMatrixmatrixStatsmemoisemetRmgcvmunsellnlmeoperator.toolspillarpkgconfigplyrproxypurrrR6RColorBrewerRcppRcppArmadilloRcppEigenrlangs2scalessfstringistringrsurvivaltibbletidyrtidyselecttimechangeunitsutf8vctrsviridisLitewithrwk

Replication Codes for Does AI help humans make better decisions?

Rendered fromability.Rmdusingknitr::rmarkdownon Jan 09 2025.

Last update: 2025-01-09
Started: 2025-01-09

Replication Codes for Experimental Evaluation of Algorithm-Assisted Human Decision-Making: Application to Pretrial Public Safety Assessment

Rendered fromaihuman.Rmdusingknitr::rmarkdownon Jan 09 2025.

Last update: 2025-01-09
Started: 2023-03-02

Readme and manuals

Help Manual

Help pageTopics
Experimental Evaluation of Algorithm-Assisted Human Decision-Makingaihuman-package aihuman
Gibbs sampler for the main analysisAiEvalmcmc
Summary of APCEAPCEsummary
Summary of APCE for frequentist analysisAPCEsummaryipw
Bootstrap for estimating variance of APCEBootstrapAPCEipw
Bootstrap for estimating variance of APCE with random effectsBootstrapAPCEipwRE
Bootstrap for estimating variance of APCE with random effectsBootstrapAPCEipwREparallel
Calculate APCECalAPCE
Compute APCE using frequentist analysisCalAPCEipw
Compute APCE using frequentist analysis with random effectsCalAPCEipwRE
Calculate APCE using parallel computingCalAPCEparallel
Calculate the delta given the principal stratumCalDelta
Calculate diff-in-means estimatesCalDIM
Calculate diff-in-means estimatesCalDIMsubgroup
Calculate the principal fairnessCalFairness
Calculate optimal decision & utilityCalOptimalDecision
Calculate the proportion of principal strata (R)CalPS
Compute Risk (AI v. Human)compute_bounds_aipw
Fit outcome/decision and propensity score modelscompute_nuisance_functions
Fit outcome/decision and propensity score models conditioning on the AI recommendationcompute_nuisance_functions_ai
Compute Risk (Human+AI v. Human)compute_stats
Agreement of Human and AI Decision Makerscompute_stats_agreement
Compute Risk (Human+AI v. Human)compute_stats_aipw
Compute Risk (Human+AI v. Human) for a Subgroup Defined by AI Recommendationcompute_stats_subgroup
Crossfitting for nuisance functionscrossfit gbm
Interim Dane data with failure to appear (FTA) as an outcomeFTAdata
Pulling ggplot legendg_legend
Interim court event hearing dateHearingDate
Synthetic court event hearing datehearingdate_synth
Interim Dane data with new criminal activity (NCA) as an outcomeNCAdata
Interim Dane data with new violent criminal activity (NVCA) as an outcomeNVCAdata
Visualize Agreementplot_agreement
Visualize Difference in Risk (AI v. Human)plot_diff_ai_aipw
Visualize Difference in Risk (Human+AI v. Human)plot_diff_human
Visualize Difference in Risk (Human+AI v. Human)plot_diff_human_aipw
Visualize Difference in Risk (Human+AI v. Human) for a Subgroup Defined by AI Recommendationplot_diff_subgroup
Visualize Preferenceplot_preference
Plot APCEPlotAPCE
Plot diff-in-means estimatesPlotDIMdecisions
Plot diff-in-means estimatesPlotDIMoutcomes
Plot the principal fairnessPlotFairness
Plot optimal decisionPlotOptimalDecision
Plot the proportion of principal strata (R)PlotPS
Plot conditional randomization testPlotSpilloverCRT
Plot power analysis of conditional randomization testPlotSpilloverCRTpower
Stacked barplot for the distribution of the decision given psaPlotStackedBar
Stacked barplot for the distribution of the decision given DMF recommendationPlotStackedBarDMF
Plot utility differencePlotUtilityDiff
Plot utility difference with 95% confidence intervalPlotUtilityDiffCI
Synthetic PSA datapsa_synth
Interim Dane PSA dataPSAdata
Conduct conditional randomization testSpilloverCRT
Conduct power analysis of conditional randomization testSpilloverCRTpower
Synthetic datasynth
Table of Agreementtable_agreement
Test monotonicityTestMonotonicity
Test monotonicity with random effectsTestMonotonicityRE