est_changepoints | R Documentation |
This function executes ptMCMC-based estimation of the change point location distributions for multinomial Time Series analyses.
est_changepoints(
data,
formula,
nchangepoints,
timename,
weights,
control = list()
)
data |
|
formula |
|
nchangepoints |
|
timename |
|
weights |
Optional class |
control |
A |
List of saved data objects from the ptMCMC estimation of
change point locations (unless nchangepoints
is 0, then
NULL
is returned).
data(rodents)
document_term_table <- rodents$document_term_table
document_covariate_table <- rodents$document_covariate_table
LDA_models <- LDA_set(document_term_table, topics = 2)[[1]]
data <- document_covariate_table
data$gamma <- LDA_models@gamma
weights <- document_weights(document_term_table)
formula <- gamma ~ 1
nchangepoints <- 1
control <- TS_control()
data <- data[order(data[,"newmoon"]), ]
rho_dist <- est_changepoints(data, formula, nchangepoints, "newmoon",
weights, control)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.