R/comp_util.R
is_valid_prob_triple.Rd
is_valid_prob_triple
is a deprecated function that verifies that
a set of 3 numeric inputs can be interpreted as a
valid set of 3 probabilities.
is_valid_prob_triple(prev, sens, spec)
The condition's prevalence prev
(i.e., the probability of condition being TRUE
).
The decision's sensitivity sens
(i.e., the conditional probability of a positive decision
provided that the condition is TRUE
).
The decision's specificity value spec
(i.e., the conditional probability
of a negative decision provided that the condition is FALSE
).
A Boolean value:
TRUE
if the probabilities provided are valid;
otherwise FALSE
.
is_valid_prob_triple
is a simplified version
of is_valid_prob_set
.
It is a quick wrapper function that only verifies
is_prob
for all of its 3 arguments.
is_valid_prob_triple
does not compute or return numeric variables.
Use is_extreme_prob_set
to verify extreme cases and
comp_complete_prob_set
to complete sets of valid probabilities.
is_extreme_prob_set
verifies extreme cases;
is_valid_prob_set
verifies sets of probability inputs;
is_valid_prob_pair
verifies that probability pairs are complements;
num
contains basic numeric variables;
init_num
initializes basic numeric variables;
prob
contains current probability information;
comp_prob
computes current probability information;
freq
contains current frequency information;
comp_freq
computes current frequency information;
as_pc
displays a probability as a percentage;
as_pb
displays a percentage as probability.
Other verification functions:
is_complement()
,
is_extreme_prob_set()
,
is_freq()
,
is_integer()
,
is_matrix()
,
is_perc()
,
is_prob()
,
is_suff_prob_set()
,
is_valid_prob_pair()
,
is_valid_prob_set()
# ways to work:
is_valid_prob_triple(0, 0, 0) # => TRUE
#> [1] TRUE
is_valid_prob_triple(1, 1, 1) # => TRUE
#> [1] TRUE
## ways to fail:
# is_valid_prob_triple(0, 0) # => ERROR (as no triple)
# is_valid_prob_triple(0, 0, 7) # => FALSE + warning (beyond range)
# is_valid_prob_triple(0, NA, 0) # => FALSE + warning (NA)
# is_valid_prob_triple("p", 0, 0) # => FALSE + warning (non-numeric)