This seems like a rather easy question, so sorry if I have overlooked an obvious answer.
When using avg_slopes() from the marginaleffects package I noticed that calculations seem to be done in parallel on all available cores. So far I have not found any possibility to change the number of cores used.
Has anyone any solution of how to do this?
For anyone who happens to stumble across this question. The question was based on using a
glmmTMBmodel as input foravg_slopes()and the observed behaviour is caused by thepredict()function ofglmmTMB.predict()ofglmmTMBwill infer the number of threads for prediction from theglmmTMBmodel, i.e. if for model fitting 24 threads were used, 24 will be used for prediction as well.This can be changed by updating the model via
update(), see also here: https://github.com/glmmTMB/glmmTMB/issues/713.