plot.strata_doctopic: Plot document-topic distribution by strata (for covariate...

View source: R/plots.R

plot.strata_doctopicR Documentation

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

Description

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

Usage

## S3 method for class '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.

See Also

save_fig(), by_strata_DocTopic()


keyATM documentation built on May 31, 2023, 6:27 p.m.