| comp_complete_prob_set {riskyr} | R Documentation |
Compute a complete set of probabilities from valid probability inputs.
Description
comp_complete_prob_set is a function takes a
valid set of (3 to 5) probabilities as inputs (as a vector)
and returns the complete set of
(3 essential and 2 optional) probabilities.
Usage
comp_complete_prob_set(prev, sens = NA, mirt = NA, spec = NA, fart = NA)
Arguments
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 |
Details
Assuming that is_valid_prob_set = TRUE
this function uses comp_comp_pair on the
two optional pairs (i.e.,
sens and mirt, and
spec and fart) and
returns the complete set of 5 probabilities.
Value
A vector of 5 probabilities:
c(prev, sens, mirt, spec, fart).
See Also
is_valid_prob_set verifies a set of probability inputs;
is_extreme_prob_set verifies extreme cases;
comp_comp_pair computes pairs of complements;
is_complement verifies numeric complements;
is_prob verifies probabilities;
comp_prob computes current probability information;
prob contains current probability information;
init_num initializes basic numeric variables;
num contains basic numeric variables.
Other functions computing probabilities:
comp_FDR(),
comp_FOR(),
comp_NPV(),
comp_PPV(),
comp_accu_freq(),
comp_accu_prob(),
comp_acc(),
comp_comp_pair(),
comp_complement(),
comp_err(),
comp_fart(),
comp_mirt(),
comp_ppod(),
comp_prob_freq(),
comp_prob(),
comp_sens(),
comp_spec()
Examples
# ways to work:
comp_complete_prob_set(1, .8, NA, .7, NA) # => 1.0 0.8 0.2 0.7 0.3
comp_complete_prob_set(1, NA, .8, NA, .4) # => 1.0 0.2 0.8 0.6 0.4
# watch out for:
comp_complete_prob_set(8) # => 8 NA NA NA NA + warnings
comp_complete_prob_set(8, 7, 6, 5, 4) # => 8 7 6 5 4 + no warning (valid set assumed)
comp_complete_prob_set(8, .8, NA, .7, NA) # => 8.0 0.8 0.2 0.7 0.3 + no warning (sic)
comp_complete_prob_set(8, 2, NA, 3, NA) # => 8 2 NA 3 NA + no warning (sic)