问题
The stm package in R allows the user to estimate the relationship between metadata and topics. I have a model M with 40 topics, and I want to explore how they change with time. In stm, it should be something like this (adapted from Molly Roberts et al., stm: R Package for Structural Topic Models):
prep = estimateEffect(1:40 ~ s(day), M, meta = out$meta, uncertainty = "Global")
This command will return 40 pairs of relationships, each refers to one topic. However, upon reading the topics I found it makes theoretical sense to group some of the topics together and reduce the number of topics. Is there a way of grouping the topics manually?
来源:https://stackoverflow.com/questions/48657585/structural-topic-modeling-in-r-group-the-topics-deductively-and-estimate-effect