I ran an stm topic model and used estimateEffect:
prep <- estimateEffect(1:20 ~ Party + s(Year), model,
meta = out$meta, uncertainty = "Global")
What is shown in the console are coefficients for all but one parties (Party) that appear in my metadata, and only 10 (out of 49) years (Year).
Below is the result for one topic.
How can I get all years displayed? I tried tidy(prep) of the tidytext package, without success.
I would say that the 10 values returned by
estimateEffect()are the result of the b-spline basis function generated by thes()function onYearcovariate.My guess is that the spline transformation must split the
Yearvalues by deciles for fitting non-linear relations between topics and the covariate. But it should be confirmed by more research or an answer by someone more skilled on this issue.