View source: R/comp_freq_freq.R
comp_freq_freq | R Documentation |
comp_freq_freq
computes current frequency information
from 4 essential frequencies
(hi
, mi
, fa
, cr
).
It returns a list of 11 frequencies freq
for a population of N
individuals
as its output.
comp_freq_freq(hi = freq$hi, mi = freq$mi, fa = freq$fa, cr = freq$cr)
hi |
The number of hits |
mi |
The number of misses |
fa |
The number of false alarms |
cr |
The number of correct rejections |
Key relationships between frequencies and probabilities
(see documentation of comp_freq
or comp_prob
for details):
Three perspectives on a population:
by condition / by decision / by accuracy.
Defining probabilities in terms of frequencies:
Probabilities can be computed as ratios between frequencies, but beware of rounding issues.
Functions translating between representational formats:
comp_prob_prob
, comp_prob_freq
,
comp_freq_prob
, comp_freq_freq
(see documentation of comp_prob_prob
for details).
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;
num
contains basic numeric parameters;
init_num
initializes basic numeric parameters;
prob
contains current probability information;
comp_prob
computes current probability information;
freq
contains current frequency information;
comp_freq
computes current frequency information;
is_prob
verifies probability inputs;
is_freq
verifies frequency inputs.
Other functions computing frequencies:
comp_freq_prob()
,
comp_freq()
,
comp_min_N()
,
comp_prob_prob()
Other format conversion functions:
comp_freq_prob()
,
comp_prob_freq()
,
comp_prob_prob()
## Basics: comp_freq_freq() all.equal(freq, comp_freq_freq()) # => should be TRUE ## Circular chain: # 1. Current numeric parameters: num # 2. Compute all 10 probabilities in prob (from essential probabilities): prob <- comp_prob() prob # 3. Compute 9 frequencies in freq from probabilities: freq <- comp_freq(round = FALSE) # no rounding (to obtain same probabilities later) freq # 4. Compute 9 frequencies AGAIN (but now from frequencies): freq_freq <- comp_freq_freq() # 5. Check equality of results (steps 2. and 4.): all.equal(freq, freq_freq) # => should be TRUE!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.