plot_fnet: Plot a network diagram of frequencies and probabilities.

Description Usage Arguments Details Value See Also Examples

View source: R/plot_fnet.R

Description

plot_fnet drew a network diagram of frequencies (as nodes) and probabilities (as edges).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plot_fnet(prev = num$prev, sens = num$sens, mirt = NA,
  spec = num$spec, fart = NA, N = freq$N, round = TRUE,
  by = "cddc", area = "no", p_lbl = "num", show_accu = TRUE,
  w_acc = 0.5, title_lbl = txt$scen_lbl, popu_lbl = txt$popu_lbl,
  cond_true_lbl = txt$cond_true_lbl,
  cond_false_lbl = txt$cond_false_lbl, dec_pos_lbl = txt$dec_pos_lbl,
  dec_neg_lbl = txt$dec_neg_lbl, hi_lbl = txt$hi_lbl,
  mi_lbl = txt$mi_lbl, fa_lbl = txt$fa_lbl, cr_lbl = txt$cr_lbl,
  col_txt = grey(0.01, alpha = 0.99), cex_lbl = 0.85,
  col_boxes = pal, col_border = grey(0.33, alpha = 0.99), lwd = 1.5,
  box_lwd = 1.5, col_shadow = grey(0.11, alpha = 0.99),
  cex_shadow = 0)

Arguments

prev

The condition's prevalence prev.

sens

The decision's sensitivity sens.

mirt

The decision's miss rate mirt.

spec

The decision's specificity value spec.

fart

The decision's false alarm rate fart.

N

The number of individuals in the population.

round

A Boolean option specifying whether computed frequencies are rounded to integers. Default: round = TRUE.

by

A character code specifying the perspective (or categories by which the population is split into subsets) with 3 options:

  1. "cddc" ... 1st by condition, 2nd by decision;

  2. "dccd" ... 1st by decision, 2nd by condition;

  3. "cdac" ... 1st by condition, 2nd by accuracy.

area

A character code specifying the area of the boxes (or their relative sizes) with 3 options:

  1. "no" ... all boxes are shown with the same size;

  2. "sq" ... boxes are squares with area sizes scaled proportional to frequencies (default);

  3. "hr" ... boxes are horizontal rectangles with area sizes scaled proportional to frequencies.

p_lbl

A character code specifying the type of probability information (on edges) with 4 options:

  1. "nam" ... names of probabilities;

  2. "num" ... numeric values of probabilities (rounded to 3 decimals, default);

  3. "mix" ... names of essential probabilities, values of complements;

  4. "min" ... minimal labels: names of essential probabilities.

show_accu

Option for showing current accuracy metrics accu on the margin of the plot.

w_acc

Weighting parameter w used to compute weighted accuracy w_acc in comp_accu_freq.

Various other options allow the customization of text labels and colors:

title_lbl

Text label for current plot title.

popu_lbl

Text label for current population popu.

cond_true_lbl

Text label for current cases of cond_true.

cond_false_lbl

Text label for current cases of cond_false.

dec_pos_lbl

Text label for current cases of dec_pos.

dec_neg_lbl

Text label for current cases of dec_neg.

hi_lbl

Text label for hits hi.

mi_lbl

Text label for misses mi.

fa_lbl

Text label for false alarms fa.

cr_lbl

Text label for correct rejections cr.

col_txt

Color for text labels (in boxes).

cex_lbl

Scaling factor for text labels (in boxes and on arrows).

col_boxes

Colors of boxes (a single color or a vector with named colors matching the number of current boxes). Default: Current color information contained in pal.

col_border

Color of borders. Default: col_border = grey(.33, alpha = .99).

lwd

Width of arrows.

box_lwd

Width of boxes.

col_shadow

Color of box shadows. Default: col_shadow = grey(.11, alpha = .99).

cex_shadow

Scaling factor of shadows (values > 0 showing shadows). Default: cex_shadow = 0.

Details

plot_fnet is deprecated – please use plot_prism instead.

Value

Nothing (NULL).

See Also

plot_prism is the new version of this function.

Other visualization functions: plot.riskyr, plot_area, plot_bar, plot_curve, plot_icons, plot_mosaic, plot_plane, plot_prism, plot_tab, plot_tree

Examples

1
2
3
4
5
6
7
plot_fnet()  # frequency network with default options (by = "cddc")

# alternative perspectives:
plot_tree(by = "cdac")  # frequency network by condition and accuracy
plot_fnet(by = "dccd")  # frequency network by decision and condition

# See plot_prism for details and additional options.

riskyr documentation built on Jan. 3, 2019, 1:06 a.m.