Structural Topic Modeling in R: Plot statistical significance for Topic Content

Viewed 185

my question relates to structural topic modeling in R, specifically to the stm package developed by Roberts et al. (https://cran.r-project.org/web/packages/stm/vignettes/stmVignette.pdf).

I implemented a structural topic model in order to investigate, whether there is a statistically significant difference in the vocabulary with which women and men describe certain topics. Thus my question relates to the word rates used in discussing a topic, the authors of the vignette refer to this as topical content analysis, see page 19.

The implementation of the code was successful and I manage to create a similar graph to the one shown in Figure 8 of the Vignette.

My question now is, how do I know whether the difference in the vocabulary with which in my case women and men describe topics is statistically significant?

And is there a way to plot this for all of my topics in one graph?

Thank you!

My code:

Estimate the Topic Model

stmContent2 <- stm(out$documents, 
                  out$vocab,
                  K = 80, 
                  prevalence =~ gender,
                  content =~ gender,
                  max.em.its = 75,
                  data = out$meta, 
                  init.type = "Spectral",
                  seed = 8458302)

plot(stmContent2, type = "perspectives", topics = 11)
0 Answers
Related