CalOptimalDecision {aihuman} | R Documentation |
Calculate optimal decision & utility
Description
(1) Calculate optimal decision for each observation given each of c0 (cost of an outcome) and c1 (cost of an unnecessarily harsh decision) from the lists. (2) Calculate difference in the expected utility between binary version of judge's decisions and DMF recommendations given each of c0 (cost of an outcome) and c1 (cost of an unnecessarily harsh decision) from the lists.
Usage
CalOptimalDecision(
data,
mcmc.re,
c0.ls,
c1.ls,
dmf = NULL,
rho = 0,
burnin = 0,
out.length = 500,
ZX = NULL,
size = 5,
include.utility.diff.mcmc = FALSE
)
Arguments
data |
A |
mcmc.re |
A |
c0.ls |
The list of cost of an outcome. See Section 3.7 for more details. |
c1.ls |
The list of cost of an unnecessarily harsh decision. See Section 3.7 for more details. |
dmf |
A numeric vector of binary DMF recommendations. If |
rho |
A sensitivity parameter. The default is |
burnin |
A proportion of burnin for the Markov chain. The default is |
out.length |
An integer to specify the progress on the screen. Every |
ZX |
The data matrix for interaction terms. The default is the interaction between Z and all of the pre-treatment covariates (X). |
size |
The number of parallel computing. The default is |
include.utility.diff.mcmc |
A logical argument specifying whether to save |
Value
A data.frame
of (1) the probability that the optimal decision for each observation being d in 0,1,...,k, (2) expected utility of binary version of judge's decision (g_d), (3) expected utility of binary DMF recommendation, and (4) the difference between (2) and (3). If include.utility.diff.mcmc = TRUE
, returns a list of such data.frame
and a data.frame
that includes the result for mean and quantile of Utility.diff.control.mcmc
and Utility.diff.treated.mcmc
across mcmc samples.
Examples
data(synth)
sample_mcmc = AiEvalmcmc(data = synth, n.mcmc = 10)
sample_optd = CalOptimalDecision(data = synth, mcmc.re = sample_mcmc,
c0.ls = seq(0,5,1), c1.ls = seq(0,5,1),
size = 1) # adjust the size