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

save.keyATM_output()

Save a keyATM_output object

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

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

Built-in data

keyATM_data_bills

Bills data

Package-level

keyATM-package

Keyword Assisted Topic Models