Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with s(date) #273

Open
louislegum opened this issue May 21, 2022 · 0 comments
Open

Issue with s(date) #273

louislegum opened this issue May 21, 2022 · 0 comments

Comments

@louislegum
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant