我想在一个表中显示多个主题的 STM estimateEffect() 的输出。作为参考,最佳情况下我希望输出看起来像在单个观星表中显示多个回归模型时的样子。
这就是我如何估计三个主题的效果:
library(STM)
data(gadarian) # load example data
## Estimate the effect on all three topics
effects <- estimateEffect(1:3 ~ treatment, gadarianFit, gadarian)
但是,我不知道如何将这些结果组合到一个视觉上吸引人的表格中。到目前为止,我只能将它们提取成整洁的格式。任何帮助将不胜感激!
##Turn into tidy data frame
library(tidystm)
td_estimate <- tidy(effects)
td_estimate