Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster extraction of posterior samples from Stan output #78

Closed
helske opened this issue Apr 4, 2024 · 2 comments
Closed

Faster extraction of posterior samples from Stan output #78

helske opened this issue Apr 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@helske
Copy link
Collaborator

helske commented Apr 4, 2024

Currently returning the posterior samples from Stan to R is very slow due to the CSV reading implemented in rstan, as is documented for example in here: stan-dev/rstan#1018. There is now faster CSV reading inbrms and also in cmdstanr. At least for cmdstanr backend we could use cmdstanr::read_cmdstan_csv (which also allows us to omit some variables from the output as in rstan), but as we work with the stanfit object in the post processing, we need some extra steps to convert the cmdstanr output to stanfit object.

@helske helske added the enhancement New feature or request label Apr 4, 2024
@jsocolar
Copy link

jsocolar commented Apr 5, 2024

brms:::read_csv_as_stanfit takes a cmdstan csv and reads it into R as a stanfit object.

@santikka
Copy link
Collaborator

rstan is no longer used to read CSV files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants