my_searchK.Rd
This function is just like stm's searchK, but it uses tidyverse and allows a formula for prevalence. Adapted from Julia Silge's blog.
my_searchK(documents, K, prevalence = ~1, seed1 = 19, ...)
Quanteda dfm object.
Numeric vector of numbers of topics to try.
Formula of topic prevalence.
Random seed to use.
Other arguments to pass to stm::stm
.
A tibble with the metrics output by searchK, plus a column for the fitted model for each value of K tried.