plot_expected_categories_2D: Plot expected bivariate (2D) category likelihoods

plot_expected_categories_contour_2DR Documentation

Plot expected bivariate (2D) category likelihoods

Description

Plot bivariate Gaussian categories expected given NIW belief(s). One NIW belief describes the uncertainty about the category statistics of all categories. This includes the m (the mean of category means \mu), S (the scattermatrix), kappa (the strength of the belief in m) and nu (the strength of the belief in S).

Usage

plot_expected_categories_contour_2D(
  x,
  levels = c(1/2, 2/3, 4/5, 9/10, 19/20),
  data.exposure = NULL,
  data.test = NULL,
  facet_rows_by = NULL,
  facet_cols_by = NULL,
  facet_wrap_by = NULL,
  animate_by = NULL,
  animation_follow = F,
  category.ids = NULL,
  category.labels = NULL,
  category.colors = NULL,
  category.linetypes = NULL,
  ...
)

plot_expected_categories_contour2D(
  x,
  levels = c(1/2, 2/3, 4/5, 9/10, 19/20),
  data.exposure = NULL,
  data.test = NULL,
  facet_rows_by = NULL,
  facet_cols_by = NULL,
  facet_wrap_by = NULL,
  animate_by = NULL,
  animation_follow = F,
  category.ids = NULL,
  category.labels = NULL,
  category.colors = NULL,
  category.linetypes = NULL,
  ...
)

Arguments

x

An NIW_belief or NIW_beliefs object.

levels

Levels of the confidence ellipses. (default: .5, .66, .8, .9., and .95)

data.exposure

Optional tibble or data.frame that contains exposure data to be plotted. (default: 'NULL')

data.test

Optional tibble or data.frame that contains test data to be plotted. (default: 'NULL')

facet_rows_by, facet_cols_by, facet_wrap_by, animate_by

Which group variables, if any, should be used for faceting and/or animation? (defaults: 'NULL')

animation_follow

Should the animation follow the data (zoom in and out)? (default: 'FALSE')

category.ids

Vector of category IDs to be plotted or leave 'NULL' to plot all groups. (default: 'NULL')

category.labels

Vector of group labels of same length as 'category.ids' or 'NULL' to use defaults. (default: 'NULL')

category.colors

Vector of colors of same length as category.ids or 'NULL' to use defaults. (default: 'NULL')

category.linetypes

Vector of linetypes of same length as category.ids or 'NULL' to use defaults. (default: 'NULL') Currently being ignored.

...

additional arguments handed to geom_polygon.

Details

It is possible to hand more than one NIW belief to this function, and to facet or animate by variables that uniquely identify the different beliefs. For example, one can plot different priors for different talkers (grouping by talker), or different posteriors for different exposure conditions (grouping by exposure condition), the incremental updating of NIW beliefs (grouping by observations), or any combinations of these.

Value

ggplot object.

See Also

TBD


hlplab/MVBeliefUpdatr documentation built on March 29, 2025, 10:42 p.m.