comp_prev: Compute the condition's prevalence (baseline probability)...

View source: R/comp_prob_freq.R

comp_prevR Documentation

Compute the condition's prevalence (baseline probability) from frequencies.

Description

comp_prev computes a condition's prevalence value prev (or baseline probability) from 4 essential frequencies (hi, mi, fa, cr).

Usage

comp_prev(hi = freq$hi, mi = freq$mi, fa = freq$fa, cr = freq$cr)

Arguments

hi

The number of hits hi (or true positives).

mi

The number of misses mi (or false negatives).

fa

The number of false alarms fa (or false positives).

cr

The number of correct rejections cr (or true negatives).

Details

A condition's prevalence value prev is the probability of the condition being TRUE.

The probability prev can be computed from frequencies as the the ratio of cond_true (i.e., hi + mi) divided by N (i.e., hi + mi + fa + cr):

prev = cond_true/N = (hi + mi)/(hi + mi + fa + cr)

See Also

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.


riskyr documentation built on Aug. 15, 2022, 9:09 a.m.