Keyword Assisted Topic Models
Estimate document-topic distribution by strata (for covariate models)
Estimate subsetted topic-word distribution
Calculate the probability for Polya-Gamma Covariate Model
Return covariates used in the iteration
Show covariates information
Run the Collapsed Gibbs sampler for the keyATM Base
Run the Collapsed Gibbs sampler for the keyATM covariates (Dir-Multi)
Run the Collapsed Gibbs sampler for the keyATM covariates (Polya-Gamma...
Run the Collapsed Gibbs sampler for the keyATM Dynamic
Run the Collapsed Gibbs sampler for weighted LDA
Run the Collapsed Gibbs sampler for weighted LDA with covariates
Run the Collapsed Gibbs sampler for the weighted LDA with HMM model
Initialize a keyATM model
Create an output object
Read texts
Keyword Assisted Topic Models
keyATM main function
Run the Variational Bayes for the keyATM models
Fit a keyATM model with Collapsed Variational Bayes
keyATM with Collapsed Variational Bayes
Initialize assignments
Run multinomial regression with Polya-Gamma augmentation
Show a diagnosis plot of alpha
Show a diagnosis plot of log-likelihood and perplexity
Show a diagnosis plot of pi
Plot time trend
Show the expected proportion of the corpus belonging to each topic
Plot document-topic distribution by strata (for covariate models)
Predict topic proportions for the covariate keyATM
Read files from the quanteda dfm (this is the same as dgCMatrix)
Convert a quanteda dictionary to keywords
Refine keywords
Save a figure
Semantic Coherence: Mimno et al. (2011)
Show the top documents for each topic
Show the top topics for each document
Show the top words for each topic
Get values used to create a figure
Visualize keywords
Weighted LDA main function
Checking if a word is in a document
Fits keyword assisted topic models (keyATM) using collapsed Gibbs samplers. The keyATM combines the latent dirichlet allocation (LDA) models with a small number of keywords selected by researchers in order to improve the interpretability and topic classification of the LDA. The keyATM can also incorporate covariates and directly model time trends. The keyATM is proposed in Eshima, Imai, and Sasaki (2024) <doi:10.1111/ajps.12779>.