Learn R Programming

textmatching (version 0.1.0)

content_levels: Content Levels

Description

A helper function which returns the levels of the content covariate in an stm model. Returns NULL if the model is not a content covariate model.

Usage

content_levels(stm_model)

Arguments

stm_model

the stm content covariate model

Value

character vector containing levels of the content covariate.

References

Roberts, M., Stewart, B., Nielsen, R. (2020) "Adjusting for Confounding with Text Matching." In American Journal of Political Science

Examples

Run this code
# NOT RUN {
data(sim)
content_levels(sim_topics)
# }

Run the code above in your browser using DataLab