Plot document-topic distribution by strata (for covariate models)

# S3 method for strata_doctopic
plot(
  x,
  show_topic = NULL,
  var_name = NULL,
  by = c("topic", "covariate"),
  ci = 0.9,
  method = c("hdi", "eti"),
  point = c("mean", "median"),
  width = 0.1,
  show_point = TRUE,
  ...
)

Arguments

x

a strata_doctopic object (see by_strata_DocTopic()).

show_topic

a vector or an integer. Indicate topics to visualize.

var_name

the name of the variable in the plot.

by

topic or covariate. Default is by topic.

ci

value of the credible interval (between 0 and 1) to be estimated. Default is 0.9 (90%).

method

method for computing the credible interval. The Highest Density Interval (hdi, default) or Equal-tailed Interval (eti).

point

method for computing the point estimate. mean (default) or median.

width

numeric. Width of the error bars.

show_point

logical. Show point estimates. The default is TRUE.

...

additional arguments not used.

Value

keyATM_fig object.