prob {riskyr} | R Documentation |
List current probability information.
Description
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:
Usage
prob
Format
An object of class list
of length 13.
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 beingTRUE
provided that the decision is positive).the decision's false detection (or false discovery) rate
FDR
(i.e., the conditional probability of the condition beingFALSE
provided that the decision is positive).the decision's negative predictive value
NPV
(i.e., the conditional probability of the condition beingFALSE
provided that the decision is negative).the decision's false omission rate
FOR
(i.e., the conditional probability of the condition beingTRUE
provided that the decision is negative).the accuracy
acc
(i.e., probability of correct decisionsdec_cor
or correspondence of decisions to conditions).the conditional probability
p_acc_hi
(i.e., the probability ofhi
given that the decision is correctdec_cor
).the conditional probability
p_err_fa
(i.e., the probability offa
given 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_bwp
,
pal_bw
,
pal_kn
,
pal_mbw
,
pal_mod
,
pal_org
,
pal_rgb
,
pal_unikn
,
pal_vir
,
pal
,
txt_TF
,
txt_org
,
txt
Examples
prob <- comp_prob() # initialize prob to default parameters
prob # show current values
length(prob) # 13 key probabilities (and their values)