Generalization of the plot function to work on fitted LDA_TS model objects (class LDA_TS) returned by LDA_TS).

# S3 method for LDA_TS
plot(x, ..., cols = set_LDA_TS_plot_cols(),
  bin_width = 1, xname = NULL, border = NA, selection = "median")

Arguments

x

A LDA_TS object of a full LDATS model fit by LDA_TS.

...

Additional arguments to be passed to subfunctions. Not currently used, just retained for alignment with plot.

cols

list of elements used to define the colors for the two panels of the summary plot, as generated simply using set_LDA_TS_plot_cols. cols has two elements: LDA and TS, each corresponding the set of plots for its stage in the full model. LDA contains entries cols and option (see set_LDA_plot_colors). TS contains two entries, rho and gamma, each corresponding to the related panel, and each containing default values for entries named cols, option, and alpha (see set_TS_summary_plot_cols, set_gamma_colors, and set_rho_hist_colors).

bin_width

Width of the bins used in the histograms of the summary time series plot, in units of the time variable used to fit the model (the x-axis).

xname

Label for the x-axis in the summary time series plot. Defaults to NULL, which results in usage of the timename element of the control list (held incontrol$TS_control$timename). To have no label printed, set xname = "".

border

Border for the histogram, default is NA.

selection

Indicator of the change points to use in the time series summary plot. Currently only defined for "median" and "mode".

Value

NULL.

Examples

# \donttest{
  data(rodents)
  mod <- LDA_TS(data = rodents, topics = 2, nseeds = 1, formulas = ~1,
                nchangepoints = 1, timename = "newmoon")
  plot(mod, binwidth = 5, xlab = "New moon")
# }