is_suff_prob_set | R Documentation |
is_suff_prob_set
is a function that
takes 3 to 5 probabilities as inputs and
verifies that they are sufficient to compute
all derived probabilities and combined frequencies
for a population of N
individuals.
is_suff_prob_set(prev, sens = NA, mirt = NA, spec = NA, fart = NA)
prev |
The condition's prevalence |
sens |
The decision's sensitivity |
mirt |
The decision's miss rate |
spec |
The decision's specificity value |
fart |
The decision's false alarm rate |
While no alternative input option for frequencies is provided,
specification of the essential probability prev
is always necessary.
However, for 2 other essential probabilities there is a choice:
either sens
or mirt
is necessary
(as both are complements).
either spec
or fart
is necessary
(as both are complements).
is_suff_prob_set
does not verify the type, range, or
consistency of its arguments. See is_prob
and
is_complement
for this purpose.
A Boolean value:
TRUE
if the probabilities provided are sufficient,
otherwise FALSE
.
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;
is_valid_prob_set
verifies the validity of probability inputs;
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_valid_prob_pair()
,
is_valid_prob_set()
,
is_valid_prob_triple()
# ways to work: is_suff_prob_set(prev = 1, sens = 1, spec = 1) # => TRUE is_suff_prob_set(prev = 1, mirt = 1, spec = 1) # => TRUE is_suff_prob_set(prev = 1, sens = 1, fart = 1) # => TRUE is_suff_prob_set(prev = 1, mirt = 1, fart = 1) # => TRUE # watch out for: is_suff_prob_set(prev = 1, sens = 2, spec = 3) # => TRUE, but is_prob is FALSE is_suff_prob_set(prev = 1, mirt = 2, fart = 4) # => TRUE, but is_prob is FALSE is_suff_prob_set(prev = 1, sens = 2, spec = 3, fart = 4) # => TRUE, but is_prob is FALSE ## ways to fail: # is_suff_prob_set() # => FALSE + warning (prev missing) # is_suff_prob_set(prev = 1) # => FALSE + warning (sens or mirt missing) # is_suff_prob_set(prev = 1, sens = 1) # => FALSE + warning (spec or fart missing)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.