Description Details Author(s) References See Also
Note: this package is in the very early stages. Our plan is to implement new functionality in future versions. As a result the API here might change substantially. Because functionality is early we haven't implemented diagnostics but please see the paper for ideas.
This package implements functions designed to help use stm to perform adjustment for text-based confounders. The proposed method has four steps (see pg 5 of the Early Access publication).
Step 1: estimate a structural topic model including the treatment as a content covariate. This step can be done using stm.
Step 2: extract each document's topics calculated as though
treated. This can be done using refit
.
Step 3: extract each document's projection onto the treated
variable. This can be done using project
.
Step 4: match on results of steps 2 and 3. This can be done
using cem or other matching package of your choice. We include
the cem_match
wrapper for convenience.
Pre-Fit Models and Data: sim
. See the Examples in the help
file of sim
for a walkthrough of all functionality.
Please be sure to read your documents! This package currently only offers basic functionality so it is easy to overmatch or undermatch if you aren't carefully examining the matched pairs the algorithm returns.
Author: Margaret E. Roberts, Brandon M. Stewart and Richard Nielsen
Maintainer: Brandon Stewart <bms4@princeton.edu>
Roberts, M., Stewart, B., Nielsen, R. (2020) "Adjusting for Confounding with Text Matching." In American Journal of Political Science
Additional papers at: structuraltopicmodel.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.