Can you share which version of rstan
are you using? The version on CRAN is a bit outdated, so installing more recent version via Repository for distributing (some) stan-dev R packages | r-packages might help. Usually those errors are associated with not recompiling something after an update - so you could also check that you install all Stan-related packages from source and that you don’t have any compiled models stored (usually in .rda
files on my Windows PC, not sure if the extension is the same on Mac)
You may also try using cmdstanr
(Getting started with CmdStanR • cmdstanr) which tends to be easier to run and maintain (and doesn’t crash R sessions) - after specifying options(brms.backend = "cmdstanr")
brms will compile models with cmdstanr
instead of rstan
Hope you can get the problem resovled soon.