View source: R/comp_prob_prob.R
comp_ppod | R Documentation |
comp_ppod
computes the proportion of positive decisions ppod
from 3 essential probabilities
prev
, sens
, and spec
.
comp_ppod(prev, sens, spec)
prev |
The condition's prevalence |
sens |
The decision's sensitivity |
spec |
The decision's specificity value |
comp_ppod
uses probabilities (not frequencies) as
inputs and returns a proportion (probability)
without rounding.
Definition: ppod
is
proportion (or probability) of positive decisions:
ppod = dec_pos/N = (hi + fa)/(hi + mi + fa + cr)
Values range from 0 (only negative decisions) to 1 (only positive decisions).
Importantly, positive decisions dec_pos
are not necessarily correct decisions dec_cor
.
The proportion of positive decisions ppod
as a probability.
A warning is provided for NaN values.
comp_sens
and comp_NPV
compute related probabilities;
is_extreme_prob_set
verifies extreme cases;
comp_complement
computes a probability's complement;
is_complement
verifies probability complements;
comp_prob
computes current probability information;
prob
contains current probability information;
is_prob
verifies probabilities.
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_complete_prob_set()
,
comp_err()
,
comp_fart()
,
comp_mirt()
,
comp_prob_freq()
,
comp_prob()
,
comp_sens()
,
comp_spec()
# (1) ways to work: comp_ppod(.10, .200, .300) # => ppod = 0.65 comp_ppod(.50, .333, .666) # => ppod = 0.3335 # (2) watch out for vectors: prev <- seq(0, 1, .1) comp_ppod(prev, .8, .5) # => 0.50 0.53 0.56 0.59 0.62 0.65 0.68 0.71 0.74 0.77 0.80 comp_ppod(prev, 0, 1) # => 0 0 0 0 0 0 0 0 0 0 0 # (3) watch out for extreme values: comp_ppod(1, 1, 1) # => 1 comp_ppod(1, 1, 0) # => 1 comp_ppod(1, 0, 1) # => 0 comp_ppod(1, 0, 0) # => 0 comp_ppod(0, 1, 1) # => 0 comp_ppod(0, 1, 0) # => 1 comp_ppod(0, 0, 1) # => 0 comp_ppod(0, 0, 0) # => 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.