ref_flag
Usage
ref_flag(scores, threshold = 2)These are threshold exceedances, not abnormalities. With many
well-calibrated independent outcomes, about 0.0455 * p rows are
expected to exceed |z| > 2 by chance.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
scores |
A ref_scores table. |
threshold |
Absolute Z threshold. |
The score table with exceedance and fdr columns, of class
ref_flags. The attributes expected_exceedances and
observed_exceedances give the chance expectation under calibration
and the observed count.
Examples
Section titled “Examples”sc <- as_scores(distributional::dist_normal(0, 1), c(0.2, 2.6, -3.1))sc$.in_sample <- FALSEref_flag(sc)# A tibble: 3 × 11 observed median centile z tail_prob tail_surprisal residual log_density <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>1 0.2 0 0.579 0.200 0.841 0.173 0.2 -0.9392 2.6 0 0.995 2.6 0.00932 4.68 2.6 -4.303 -3.1 0 0.000968 -3.1 0.00194 6.25 -3.1 -5.72# ℹ 3 more variables: .in_sample <lgl>, exceedance <lgl>, fdr <dbl>