comp_min_N | R Documentation |
comp_min_N
computes a population size value N
(an integer
as a power of 10) so that the frequencies of the 4 combinations of conditions and decisions
(i.e., the cells of the confusion table, or center row of boxes in the frequency prism)
reach or exceed a minimum value min_freq
given the basic parameters
prev
, sens
, and spec
(spec = 1 - fart
).
comp_min_N(prev, sens, spec, min_freq = 1)
prev |
The condition's prevalence value |
sens |
The decision's sensitivity value |
spec |
The specificity value |
min_freq |
The minimum frequency of each combination of
a condition and a decision (i.e., hits, misses, false alarms, and correct rejections).
Default: |
Using this function helps avoiding excessively small decimal values in categories
– especially hi
, mi
, fa
, cr
–
when expressing combinations of conditions and decisions as natural frequencies.
As values of zero (0) are tolerable, the function only increases N
(in powers of 10) while the current value of any frequency (cell in confusion table or
leaf of a frequency tree) is positive but below min_freq
.
By default, comp_freq_prob
and comp_freq
round frequencies to nearest integers to avoid decimal values in
freq
(i.e., round = TRUE
by default).
Using the option round = FALSE
turns off rounding.
An integer value N
(as a power of 10).
population size N
;
num
contains basic numeric parameters;
freq
contains current frequency information;
comp_freq
computes frequencies from probabilities;
prob
contains current probability information;
comp_prob
computes probabilities from probabilities;
comp_freq_freq
computes current frequency information from (4 essential) frequencies;
comp_freq_prob
computes current frequency information from (3 essential) probabilities;
comp_prob_freq
computes current probability information from (4 essential) frequencies;
comp_prob_prob
computes current probability information from (3 essential) probabilities.
Other functions computing frequencies:
comp_freq_freq()
,
comp_freq_prob()
,
comp_freq()
,
comp_prob_prob()
comp_min_N(0, 0, 0) # => 1 comp_min_N(1, 1, 1) # => 1 comp_min_N(1, 1, 1, min_freq = 10) # => 10 comp_min_N(1, 1, 1, min_freq = 99) # => 100 comp_min_N(.1, .1, .1) # => 100 = 10^2 comp_min_N(.001, .1, .1) # => 10 000 = 10^4 comp_min_N(.001, .001, .1) # => 1 000 000 = 10^6 comp_min_N(.001, .001, .001) # => 1 000 000 = 10^6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.