Combine the objects returned by LDA_set, select_LDA, TS_on_LDA, and select_TS, name them as elements of the list, and set the class of the list as LDA_TS, for the return from LDA_TS.

package_LDA_TS(LDAs, sel_LDA, TSs, sel_TSs)

Arguments

LDAs

List (class: LDA_set) of LDA models (class: LDA), as returned by LDA_set.

sel_LDA

A reduced version of LDAs that only includes the LDA model(s) selected by select_LDA. Still should be of class LDA_set.

TSs

Class TS_on_LDA list of results from TS applied for each model on each LDA model input, as returned by TS_on_LDA.

sel_TSs

A reduced version of TSs (of class TS_fit) that only includes the TS model chosen via select_TS.

Value

Class LDA_TS-class object including all fitted models and selected models specifically, ready to be returned from LDA_TS.

Examples

# \donttest{
  data(rodents)
  data <- rodents
  control <- LDA_TS_control()
  dtt <- data$document_term_table
  dct <- data$document_covariate_table
  weights <- document_weights(dtt)
  LDAs <- LDA_set(dtt, 2, 1, control$LDA_set_control)
  sel_LDA <- select_LDA(LDAs, control$LDA_set_control)
  TSs <- TS_on_LDA(sel_LDA, dct, ~1, 1, "newmoon", weights,
                   control$TS_control)
  sel_TSs <- select_TS(TSs, control$TS_control)
  package_LDA_TS(LDAs, sel_LDA, TSs, sel_TSs)
# }