I’m getting the above error when running some models but not others under cmdstanr. For example the simple Bernoulli example runs fine:
But the attached model appear to run but errors out at the last moment simuGP.stan (381 Bytes)
N = 551
x <- 22 * (0:(N - 1)) / (N - 1) - 11
alpha_true <- 3
rho_true <- 5.5
file <- file.path("simuGP.stan")
# Data as a named list (like RStan)
simu_data <- list(alpha=alpha_true, rho=rho_true, N=N, x=x)
# Run MCMC using the 'sample' method
fit_mcmc <- mod$sample(
data = simu_data,
seed = 123,
chains = 2,
parallel_chains = 2
)
A search of the error led me here: Error: Can't find the following sampler diagnostic(s) in the output: treedepth__, divergent__ · Issue #364 · stan-dev/cmdstanr · GitHub - > but its apparently been fixed already. I tried remove my rstan, cmdstanr and StanHeaders and reinstalling them all but to no avail