| is_valid_freq_set | R Documentation |
is_valid_freq_set is a function that verifies that a set of
4 essential frequencies (hi, mi,
fa, and cr) forms a valid set of frequencies
(i.e., each value is a non-missing, non-negative numeric value).
is_valid_freq_set(hi, mi, fa, cr, allow_noninteger = TRUE)
hi |
The number of hits |
mi |
The number of misses |
fa |
The number of false alarms |
cr |
The number of correct rejections |
allow_noninteger |
Boolean value for allowing non-integer
(i.e., exact, non-rounded) frequencies.
Default: |
Importantly, the values of the frequencies are not checked for consistency with current probabilities or population size parameters.
is_valid_freq_set is the frequency analog of
is_valid_prob_set and uses is_freq-style
criteria, but (by default) also accepts non-integer frequencies,
as riskyr uses exact (i.e., non-rounded) frequencies internally.
Setting allow_noninteger = FALSE additionally requires that all
4 frequencies are integers (e.g., for creating a population of individuals).
The function is vector-safe: When provided with vectors of frequencies,
it returns a single Boolean value that is TRUE only if all
elements are valid frequencies.
A Boolean value: TRUE if the 4 frequencies form a
valid set; otherwise FALSE.
is_freq verifies (integer) frequencies;
is_valid_prob_set verifies sets of probabilities;
comp_freq computes current frequency information;
freq contains current frequency information.
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(),
is_valid_prob_triple()
is_valid_freq_set(1, 2, 3, 4) # => TRUE
is_valid_freq_set(10.5, 2, 3, 4) # => TRUE (non-integer allowed by default)
is_valid_freq_set(10.5, 2, 3, 4, allow_noninteger = FALSE) # => FALSE
is_valid_freq_set(1, 2, 3, NA) # => FALSE (due to NA)
is_valid_freq_set(1, 2, 3, -4) # => FALSE (due to negative value)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.