Skip to contents

Expected topic proportions over the values of a numeric covariate (usually the year), with simulation intervals, one facet per topic. The estimates come from topic_effects() (method = "continuous").

Usage

plot_topic_prevalence_over_time(
  effects,
  topic_labels = NULL,
  covariate = "year",
  n_sims = 500L,
  n_points = 100L,
  wrap_width = 30,
  base_size = 16,
  colour = scico::scico(1, palette = "batlow", begin = 0.25),
  ...
)

Arguments

effects

An estimateEffect object (stm::estimateEffect()).

topic_labels

Optional table with topic and label.

covariate

Character scalar, the numeric covariate on the x axis.

n_sims, n_points

Integer scalars, number of draws and grid points passed to topic_effects().

wrap_width

Integer scalar, width at which facet labels wrap.

base_size

Numeric scalar, base font size of the theme.

colour

Colour of the lines and ribbons.

...

Not used: an argument renamed in the development version of mintR gives an error naming its replacement.

Value

A ggplot whose data is the table of topic_effects() (with topic_label, the wrapped label of the facets).