Hello everyone,

I’m estimating large stan models, where I only care about a small subset of the parameters. I’m using cmdstan for the estimation, save chains as csv-files, and do postprocessing in r.

I’m starting to run into problems with memory, as each mcmc-chain is several gb and hence I don’t have enough memory for consolidating them directly with read_stan_csv.

Is there a simple way to import one chain at the time to r with read_stan_csv, subset the chain to the relevant parameters, and finally combine the subsetted chains using sflist2stanfit?

thanks,

Ole-Petter