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

Add methods for coda #27

Closed
nk027 opened this issue Aug 29, 2019 · 3 comments
Closed

Add methods for coda #27

nk027 opened this issue Aug 29, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@nk027
Copy link
Owner

nk027 commented Aug 29, 2019

It makes sense to work on the interface to coda and facilitate it's use.

@nk027 nk027 added the enhancement New feature or request label Aug 29, 2019
@nk027
Copy link
Owner Author

nk027 commented Aug 30, 2019

It makes sense to provide a method for coda::mcmc, that (at the very least) adds the hyperparameters. This may include coda::mcmc.list for multiple chains (including a check whether the chains are comparable).

Other possible methods for:
mcpar, nchain, niter, and nvar.

We should also look into adding betas.

@nk027
Copy link
Owner Author

nk027 commented Sep 2, 2019

Looks very nice so far!

Betas are now also added. I've also moved the data preparation (which is the same across as.mcmc, density and plot to its own function in 15_prep_data.R. I think the other methods can be put off for now, as they're available after converting to coda.

@nk027 nk027 closed this as completed Sep 2, 2019
@nk027
Copy link
Owner Author

nk027 commented Apr 27, 2020

Okay note that there's some considerations regarding the use of coda.

We provide two methods for as.mcmc(), but do not really want to import+export it. Before we bypassed that by exporting the methods as (weird) functions, which seemed to work. Now there seems to be an issue with that under Windows, which surfaced when testing the vignette. Apparently the functions are not always recognised as methods, which means that as.mcmc produces some abomination out 'bvar' objects.

It seems like this can be bypassed / fixed in a reasonable way by dynamically registering these functions - i.e. if coda is loaded, or as soon as it is. This is done in zzz.R and was inspired by the hms package.

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

1 participant