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

sampler_diagnostics(): format and variables names #301

Closed
gbiele opened this issue Sep 23, 2020 · 2 comments
Closed

sampler_diagnostics(): format and variables names #301

gbiele opened this issue Sep 23, 2020 · 2 comments

Comments

@gbiele
Copy link

gbiele commented Sep 23, 2020

The variable names and and format of nuts-sampler parameters are incompatible with what plotting functions of the posterior package expect. (I hope I didn't overlook a function in posterior that deals with that..)

The methods sampler_diagnostics() returns an array where the names for chain, iteration and draw are ".chain" ".iteration" ".draw" and parameters in different arrays. However posterior expects a "long form" data.frame with variables names Iteration, Parameter, Value, Chain.

Its of course not a problem to reformat this myself, but I think it would be convenient if sampler_diagnostics() could also return data in a format the plotting functions of the posterior package can work with.

CmdStanR version number
cmdstanr_0.1.0

posterior version number
posterior_0.1.0

@jgabry
Copy link
Member

jgabry commented Sep 28, 2020

Hey @gbiele, sorry for the delay! Just seeing this now.

I think you meant to refer to the bayesplot package instead of the posterior package, right? If so, then I think the latest bayesplot on github does what you need. There hasn't been a bayesplot CRAN release since I added it, but if you install bayesplot from github you can use the new methods for CmdStanMCMC objects that I added in stan-dev/bayesplot#227.

@gbiele
Copy link
Author

gbiele commented Oct 2, 2020

OK, got it.
Thanks for the pointer!

@gbiele gbiele closed this as completed Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants