You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
I have been using the stm package, when I use s(date) as a covariate for prevelence I get this error message (see below) but I dont get the same message when not applying the s() function and I was wondering how important this difference is and what may be causing the issue?
Error message:
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.
Hi there,
I have been using the stm package, when I use s(date) as a covariate for prevelence I get this error message (see below) but I dont get the same message when not applying the s() function and I was wondering how important this difference is and what may be causing the issue?
Error message:
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.
STM code:
first_stm <-
stm(documents = q_dfm1$documents,
vocab = q_dfm1$vocab, K = 15, prevalence =~ Newspaper_regionality + s(Date), max.em.its = 150,
data = q_dfm1$data, init.type = "Spectral", verbose = FALSE)
Thank you for your time!
The text was updated successfully, but these errors were encountered: