prob is a list of named numeric variables
containing 3 essential (1 non-conditional prev and
2 conditional sens and spec) probabilities
and 8 derived (ppod and acc,
as well as 6 conditional) probabilities:
Details
prob currently contains the following probabilities:
the condition's prevalence
prev(i.e., the probability of the condition beingTRUE):prev = cond_true/N.the decision's sensitivity
sens(i.e., the conditional probability of a positive decision provided that the condition isTRUE).the decision's miss rate
mirt(i.e., the conditional probability of a negative decision provided that the condition isTRUE).the decision's specificity
spec(i.e., the conditional probability of a negative decision provided that the condition isFALSE).the decision's false alarm rate
fart(i.e., the conditional probability of a positive decision provided that the condition isFALSE).the proportion (baseline probability or rate) of the decision being positive
ppod(but not necessarily true):ppod = dec_pos/N.the decision's positive predictive value
PPV(i.e., the conditional probability of the condition beingTRUEprovided that the decision is positive).the decision's false detection (or false discovery) rate
FDR(i.e., the conditional probability of the condition beingFALSEprovided that the decision is positive).the decision's negative predictive value
NPV(i.e., the conditional probability of the condition beingFALSEprovided that the decision is negative).the decision's false omission rate
FOR(i.e., the conditional probability of the condition beingTRUEprovided that the decision is negative).the accuracy
acc(i.e., probability of correct decisionsdec_coror correspondence of decisions to conditions).the conditional probability
p_acc_hi(i.e., the probability ofhigiven that the decision is correctdec_cor).the conditional probability
p_err_fa(i.e., the probability offagiven that the decision is erroneousdec_err).
These probabilities are computed from basic probabilities
(contained in num) and computed by using
comp_prob.
The list prob is the probability counterpart
to the list containing frequency information freq.
Note that inputs of extreme probabilities (of 0 or 1)
may yield unexpected values (e.g., an NPV
value of NaN when is_extreme_prob_set
evaluates to TRUE).
Key relationships between frequencies and probabilities
(see documentation of comp_freq or comp_prob for details):
Three perspectives on a population:
by condition / by decision / by accuracy.
Defining probabilities in terms of frequencies:
Probabilities can be computed as ratios between frequencies, but beware of rounding issues.
Functions translating between representational formats:
comp_prob_prob, comp_prob_freq,
comp_freq_prob, comp_freq_freq
(see documentation of comp_prob_prob for details).
Visualizations of current probability information
are provided by plot_area,
plot_prism, and plot_curve.
See also
num contains basic numeric parameters;
init_num initializes basic numeric parameters;
txt contains current text information;
init_txt initializes text information;
pal contains current color information;
init_pal initializes color information;
freq contains current frequency information;
comp_freq computes current frequency information;
prob contains current probability information;
comp_prob computes current probability information;
accu contains current accuracy information.
Other lists containing current scenario information:
accu,
freq,
num,
pal,
pal_bw,
pal_bwp,
pal_kn,
pal_mbw,
pal_mod,
pal_org,
pal_rgb,
pal_unikn,
pal_vir,
txt,
txt_TF,
txt_org
Examples
prob <- comp_prob() # initialize prob to default parameters
prob # show current values
#> $prev
#> [1] 0.25
#>
#> $sens
#> [1] 0.85
#>
#> $mirt
#> [1] 0.15
#>
#> $spec
#> [1] 0.75
#>
#> $fart
#> [1] 0.25
#>
#> $ppod
#> [1] 0.4
#>
#> $PPV
#> [1] 0.53125
#>
#> $FDR
#> [1] 0.46875
#>
#> $NPV
#> [1] 0.9375
#>
#> $FOR
#> [1] 0.0625
#>
#> $acc
#> [1] 0.775
#>
#> $p_acc_hi
#> [1] 0.2741935
#>
#> $p_err_fa
#> [1] 0.8333333
#>
length(prob) # 13 key probabilities (and their values)
#> [1] 13
