plot_icons | R Documentation |
plot_icons
plots a population of which individual's
condition has been classified correctly or incorrectly as icons
from a sufficient and valid set of 3 essential probabilities
(prev
, and
sens
or its complement mirt
, and
spec
or its complement fart
)
or existing frequency information freq
and a population size of N
individuals.
plot_icons( prev = num$prev, sens = num$sens, mirt = NA, spec = num$spec, fart = NA, N = freq$N, sample = FALSE, arr_type = "array", by = "all", ident_order = c("hi", "mi", "fa", "cr"), icon_types = 22, icon_size = NULL, icon_brd_lwd = 1.5, block_d = NULL, border_d = 0.1, block_size_row = 10, block_size_col = 10, nblocks_row = NULL, nblocks_col = NULL, fill_array = "left", fill_blocks = "rowwise", lbl_txt = txt, main = txt$scen_lbl, sub = "type", title_lbl = NULL, cex_lbl = 0.9, col_pal = pal, transparency = 0.5, mar_notes = FALSE, ... )
prev |
The condition's prevalence |
sens |
The decision's sensitivity |
mirt |
The decision's miss rate |
spec |
The decision's specificity value |
fart |
The decision's false alarm rate |
N |
The number of individuals in the population.
A suitable value of |
sample |
Boolean value that determines whether frequency values
are sampled from |
arr_type |
The icons can be arranged in different ways resulting in different types of displays:
|
by |
A character code specifying a perspective to split the population into subsets, with 4 options:
|
ident_order |
The order in which icon identities
(i.e., hi, mi, fa, and cr) are plotted.
Default: |
icon_types |
specifies the appearance of the icons as a vector.
Default: |
icon_size |
specifies the size of the icons via |
icon_brd_lwd |
specifies the border width of icons (if applicable).
Default: |
block_d |
The distance between blocks.
Default: |
border_d |
The distance of icons to the border.
Default: Additional options for controlling the arrangement of arrays
(for |
block_size_row |
specifies how many icons should be in each block row.
Default: |
block_size_col |
specifies how many icons should be in each block column.
Default: |
nblocks_row |
Number of blocks per row.
Default: |
nblocks_col |
Number of blocks per column.
Default: |
fill_array |
specifies how the blocks are filled into the array.
Options: |
fill_blocks |
specifies how icons within blocks are filled.
Options: Generic text and color options: |
lbl_txt |
Default label set for text elements.
Default: |
main |
Text label for main plot title.
Default: |
sub |
Text label for plot subtitle (on 2nd line).
Default: |
title_lbl |
Deprecated text label for current plot title.
Replaced by |
cex_lbl |
Scaling factor for text labels.
Default: |
col_pal |
Color palette.
Default: |
transparency |
Specifies the transparency for overlapping icons
(not for |
mar_notes |
Boolean option for showing margin notes.
Default: |
... |
Other (graphical) parameters. |
If probabilities are provided, a new list of
natural frequencies freq
is computed by comp_freq
.
By contrast, if no probabilities are provided,
the values currently contained in freq
are used.
By default, comp_freq
rounds frequencies to nearest integers
to avoid decimal values in freq
.
Nothing (NULL).
Other visualization functions:
plot.riskyr()
,
plot_area()
,
plot_bar()
,
plot_crisk()
,
plot_curve()
,
plot_fnet()
,
plot_mosaic()
,
plot_plane()
,
plot_prism()
,
plot_tab()
,
plot_tree()
# Basics: plot_icons(N = 1000) # icon array with default settings (arr_type = "array") plot_icons(arr_type = "shuffledarray", N = 1000) # icon array with shuffled IDs # Sampling: plot_icons(N = 1000, prev = 1/2, sens = 2/3, spec = 6/7, sample = TRUE) # array types: plot_icons(arr_type = "mosaic", N = 1000) # areas as in mosaic plot plot_icons(arr_type = "fillequal", N = 1000) # areas of equal size (probability as density) plot_icons(arr_type = "fillleft", N = 1000) # icons filled from left to right (in columns) plot_icons(arr_type = "filltop", N = 1000) # icons filled from top to bottom (in rows) plot_icons(arr_type = "scatter", N = 1000) # icons randomly scattered # by: plot_icons(N = 1000, by = "all") # hi, mi, fa, cr (TP, FN, FP, TN) cases plot_icons(N = 1000, by = "cd", main = "Cases by condition") # (hi + mi) vs. (fa + cr) plot_icons(N = 1000, by = "dc", main = "Cases by decision") # (hi + fa) vs. (mi + cr) plot_icons(N = 1000, by = "ac", main = "Cases by accuracy") # (hi + cr) vs. (fa + mi) # Custom icon types and colors: plot_icons(N = 800, arr_type = "array", icon_types = c(21, 22, 23, 24), block_d = 0.5, border_d = 0.5, col_pal = pal_vir) plot_icons(N = 800, arr_type = "shuffledarray", icon_types = c(21, 23, 24, 22), block_d = 0.5, border_d = 0.5) plot_icons(N = 800, arr_type = "fillequal", icon_types = c(21, 22, 22, 21), icon_brd_lwd = .5, cex = 1, cex_lbl = 1.1) # Text and color options: plot_icons(N = 1000, prev = .5, sens = .5, spec = .5, arr_type = "shuffledarray", main = "My title", sub = NA, lbl_txt = txt_TF, col_pal = pal_vir, mar_notes = TRUE) plot_icons(N = 1000, prev = .5, sens = .5, spec = .5, arr_type = "shuffledarray", main = "Green vs. red", col_pal = pal_rgb, transparency = .5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.