Preparation

keyATM_read()

Read texts

read_keywords()

Convert a quanteda dictionary to keywords

visualize_keywords()

Visualize keywords

Fitting models

keyATM()

keyATM main function

keyATMvb()

keyATM with Collapsed Variational Bayes

weightedLDA()

Weighted LDA main function

Checking results

plot_alpha()

Show a diagnosis plot of alpha

plot_modelfit()

Show a diagnosis plot of log-likelihood and perplexity

plot_pi()

Show a diagnosis plot of pi

top_docs()

Show the top documents for each topic

top_topics()

Show the top topics for each document

top_words()

Show the top words for each topic

Making plots

plot_alpha()

Show a diagnosis plot of alpha

plot_modelfit()

Show a diagnosis plot of log-likelihood and perplexity

plot_pi()

Show a diagnosis plot of pi

plot_timetrend()

Plot time trend

plot_topicprop()

Show the expected proportion of the corpus belonging to each topic

save_fig()

Save a figure

values_fig()

Get values used to create a figure

Additional analyses

by_strata_DocTopic()

Estimate document-topic distribution by strata (for covariate models)

by_strata_TopicWord()

Estimate subsetted topic-word distribution

covariates_get()

Return covariates used in the iteration

covariates_info()

Show covariates information

plot(<strata_doctopic>)

Plot document-topic distribution by strata (for covariate models)

predict(<keyATM_output>)

Predict topic proportions for the covariate keyATM

Diagnostics

semantic_coherence()

Semantic Coherence: Mimno et al. (2011)

Built-in data

keyATM_data_bills

Bills data

Misc.

keyATM-package

Keyword Assisted Topic Models

multiPGreg()

Run multinomial regression with Polya-Gamma augmentation