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

Requiring no NAs in prepare_mcmc_array #250

Open
GustafRydevik opened this issue Nov 15, 2020 · 0 comments
Open

Requiring no NAs in prepare_mcmc_array #250

GustafRydevik opened this issue Nov 15, 2020 · 0 comments

Comments

@GustafRydevik
Copy link

When running the plotting functions (e.g mcmc_trace) on a cmdstan draws() object, the draws() object gets converted to an array using prepare_mcmc_array. This function currently have a requirement built in testing for anyNA(x), and throws an error if there's any NA discovered. This causes an issue with my current model, which has parameter estimates that are of work-around "ragged array" format, where different columns have different numbers of observations, and the remaining cells are filled with NA to create a rectangular matrix. It means I can't use the mcmc_trace without creating a new implementation of the function, removing the anyNA check.

It's not uncommon for data structures to have intentional NA's in them, so I would suggest an error for this condition is too strict.

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

1 participant