Import csv output from cmdstan in R: How to indicate the chain?

I am not sure how you can do that with rstan’s functions but this work for cmdstan output and traceplots:

# install.packages("remotes")
remotes::install_github("stan-dev/cmdstanr")

library(cmdstanr)
library(bayesplot)

fit <- as_cmdstan_fit(files)

color_scheme_set("mix-blue-pink")
mcmc_trace(fit$draws(variables = c("alpha", "beta[1]")))

1 Like