expand_TS {LDATS} | R Documentation |
Expand the TS models across the factorial combination of LDA models, formulas, and number of change points
Description
Expand the completely crossed combination of model inputs: LDA model results, formulas, and number of change points.
Usage
expand_TS(LDA_models, formulas, nchangepoints)
Arguments
LDA_models |
List of LDA models (class |
formulas |
Vector of |
nchangepoints |
Vector of |
Value
Expanded data.frame
table of the three values (columns) for
each unique model run (rows): [1] the LDA model (indicated
as a numeric element reference to the LDA_models
object), [2] the
regressor formula, and [3] the number of changepoints.
Examples
data(rodents)
document_term_table <- rodents$document_term_table
document_covariate_table <- rodents$document_covariate_table
LDAs <- LDA_set(document_term_table, topics = 2:3, nseeds = 2)
LDA_models <- select_LDA(LDAs)
weights <- document_weights(document_term_table)
formulas <- c(~ 1, ~ newmoon)
nchangepoints <- 0:1
expand_TS(LDA_models, formulas, nchangepoints)