LDATS0.3.0 package

Latent Dirichlet Allocation Coupled with Time Series Analyses

AICc

Calculate AICc

autocorr_plot

Produce the autocorrelation panel for the TS diagnostic plot of a para...

check_changepoints

Check that a set of change point locations is proper

check_control

Check that a control list is proper

check_document_covariate_table

Check that the document covariate table is proper

check_document_term_table

Check that document term table is proper

check_formula

Check that a formula is proper

check_formulas

Check that formulas vector is proper and append the response variable

check_LDA_models

Check that LDA model input is proper

check_nchangepoints

Check that nchangepoints vector is proper

check_seeds

Check that nseeds value or seeds vector is proper

check_timename

Check that the time vector is proper

check_topics

Check that topics vector is proper

check_weights

Check that weights vector is proper

count_trips

Count trips of the ptMCMC particles

diagnose_ptMCMC

Calculate ptMCMC summary diagnostics

document_weights

Calculate document weights for a corpus

ecdf_plot

Produce the posterior distribution ECDF panel for the TS diagnostic pl...

est_changepoints

Use ptMCMC to estimate the distribution of change point locations

est_regressors

Estimate the distribution of regressors, unconditional on the change p...

expand_TS

Expand the TS models across the factorial combination of LDA models, f...

iftrue

Replace if TRUE

LDA_msg

Create the model-running-message for an LDA

LDA_set

Run a set of Latent Dirichlet Allocation models

LDA_set_control

Create control list for set of LDA models

LDA_TS

Run a full set of Latent Dirichlet Allocations and Time Series models

LDA_TS_control

Create the controls list for the LDATS model

LDATS

Package to conduct two-stage analyses combining Latent Dirichlet Alloc...

logLik.LDA_VEM

Calculate the log likelihood of a VEM LDA model fit

logLik.multinom_TS_fit

Log likelihood of a multinomial TS model

logLik.TS_fit

Determine the log likelihood of a Time Series model

logsumexp

Calculate the log-sum-exponential (LSE) of a vector

memoise_fun

Logical control on whether or not to memoise

messageq

Optionally generate a message based on a logical input

mirror_vcov

Create a properly symmetric variance covariance matrix

modalvalue

Determine the mode of a distribution

multinom_TS

Fit a multinomial change point Time Series model

multinom_TS_chunk

Fit a multinomial Time Series model chunk

normalize

Normalize a vector

package_chunk_fits

Package the output of the chunk-level multinomial models into a multin...

package_LDA_set

Package the output from LDA_set

package_LDA_TS

Package the output of LDA_TS

package_TS

Summarize the Time Series model

package_TS_on_LDA

Package the output of TS_on_LDA

plot.LDA_set

Plot a set of LDATS LDA models

plot.LDA_TS

Plot the key results from a full LDATS analysis

plot.LDA_VEM

Plot the results of an LDATS LDA model

plot.TS_fit

Plot an LDATS TS model

posterior_plot

Produce the posterior distribution histogram panel for the TS diagnost...

prep_chunks

Prepare the time chunk table for a multinomial change point Time Serie...

prep_cpts

Initialize and update the change point matrix used in the ptMCMC algor...

prep_ids

Initialize and update the chain ids throughout the ptMCMC algorithm

prep_LDA_control

Set the control inputs to include the seed

prep_pbar

Initialize and tick through the progress bar

prep_proposal_dist

Pre-calculate the change point proposal distribution for the ptMCMC al...

prep_ptMCMC_inputs

Prepare the inputs for the ptMCMC algorithm estimation of change point...

prep_saves

Prepare and update the data structures to save the ptMCMC output

prep_temp_sequence

Prepare the ptMCMC temperature sequence

prep_TS_data

Prepare the model-specific data to be used in the TS analysis of LDA o...

print.LDA_TS

Print the selected LDA and TS models of LDA_TS object

print.TS_fit

Print a Time Series model fit

print.TS_on_LDA

Print a set of Time Series models fit to LDAs

print_model_run_message

Print the message to the console about which combination of the Time S...

proposed_step_mods

Fit the chunk-level models to a time series, given a set of proposed c...

rho_lines

Add change point location lines to the time series plot

select_LDA

Select the best LDA model(s) for use in time series

select_TS

Select the best Time Series model

set_gamma_colors

Prepare the colors to be used in the gamma time series

set_LDA_plot_colors

Prepare the colors to be used in the LDA plots

set_LDA_TS_plot_cols

Create the list of colors for the LDATS summary plot

set_rho_hist_colors

Prepare the colors to be used in the change point histogram

set_TS_summary_plot_cols

Create the list of colors for the TS summary plot

sim_LDA_data

Simulate LDA data from an LDA structure given parameters

sim_LDA_TS_data

Simulate LDA_TS data from LDA and TS model structures and parameters

sim_TS_data

Simulate TS data from a TS model structure given parameters

softmax

Calculate the softmax of a vector or matrix of values

step_chains

Conduct a within-chain step of the ptMCMC algorithm

summarize_etas

Summarize the regressor (eta) distributions

summarize_rhos

Summarize the rho distributions

swap_chains

Conduct a set of among-chain swaps for the ptMCMC algorithm

trace_plot

Produce the trace plot panel for the TS diagnostic plot of a parameter

TS

Conduct a single multinomial Bayesian Time Series analysis

TS_control

Create the controls list for the Time Series model

TS_diagnostics_plot

Plot the diagnostics of the parameters fit in a TS model

TS_on_LDA

Conduct a set of Time Series analyses on a set of LDA models

TS_summary_plot

Create the summary plot for a TS fit to an LDA model

verify_changepoint_locations

Verify the change points of a multinomial time series model

Combines Latent Dirichlet Allocation (LDA) and Bayesian multinomial time series methods in a two-stage analysis to quantify dynamics in high-dimensional temporal data. LDA decomposes multivariate data into lower-dimension latent groupings, whose relative proportions are modeled using generalized Bayesian time series models that include abrupt changepoints and smooth dynamics. The methods are described in Blei et al. (2003) <doi:10.1162/jmlr.2003.3.4-5.993>, Western and Kleykamp (2004) <doi:10.1093/pan/mph023>, Venables and Ripley (2002, ISBN-13:978-0387954578), and Christensen et al. (2018) <doi:10.1002/ecy.2373>.

  • Maintainer: Juniper L. Simonis
  • License: MIT + file LICENSE
  • Last published: 2023-09-19