So I have revisited some analysis I did in 2022 as I was rerunning a graph for a publication. However, when I reran my script I got a different result. I have run it on a different laptop and I got a different result AGAIN. I have also run in Google Collab and again, the result was different. Any ideas why?
It's structural topic modelling, on Tweets using date as metadata in the first, and sentiment in the second. Both come back different, but I have only included the one example here.
My data is definitely the same
library(stm)
processed <- textProcessor(clean_data2$text, metadata = clean_data2)
out <- prepDocuments(processed$documents, processed$vocab, processed$meta)
docs <- out$documents
vocab <- out$vocab
meta <- out$meta
set.seed(4381887)
First_stm <- stm(docs, vocab, 13, prevalence = ~ date, data = meta)
prep <- estimateEffect(1:13 ~ s(date), stmobj = First_stm, metadata = meta, uncertainty = "Global", prior = 1e-5)
plot(x = prep, covariate = "date", method = "continuous", topics = 1:13, xlab = "Time 2018-2022", printlegend = F, xaxt = 'n')