I'm trying to run the initial steps of this stm tutorial
https://github.com/dondealban/learning-stm
with this dataset, it is part of the original one
http://www.mediafire.com/file/1jk2aoz4ac84jn6/data.csv/file
install.packages("stm")
library(stm)
load("VignetteObjects.RData")
data <- read.csv("C:/data.csv")
head(data)
processed <- textProcessor(data$documents, metadata=data)
out <- prepDocuments(processed$documents, processed$vocab, processed$meta)
docs <- out$documents
vocab <- out$vocab
meta <- out$meta
poliblogPrevFit <- stm(out$documents, out$vocab, K=4, prevalence=~rating+s(day),
max.em.its=200, data=out$meta, init.type="Spectral",
seed=8458159)
But I keep getting the same error
Error in makeTopMatrix(prevalence, data) : Error creating model matrix.
This could be caused by many things including
explicit calls to a namespace within the formula.
Try a simpler formula.
Please can anyone run it in 64 bits MS Windows R-3.5.2.. I could not even find similar errors anywhere..