Attribute or other way to distinguish MCMC vs MC
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 171
- Forks
- 26
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
The posterior package started with focus on multi-chain MCMC and stores chain and iterations ids. These are useful when computing multi-chain Rhat, ESS, and MCSE. It is also possible to set weights for the draws which is usedul for importance sampling. It would be useful to think about the default behavior of some functions and whether the current draws objects contain sufficient information to do the right thing. For example, if we want to compute MCSE we have 4 different cases
- MCMC draws (e.g. usual Stan posterior draws, use MCMC-ESS to compute MCSE)
- MCMC draws with weights (e.g. Stan posterior draws + IS, e.g. in loo, use MCMC-ESS and IS-ESS)
- MC draws (e.g. draws from Gaussian posterior approximation, use MC-ESS)
- MC draws with weights (e.g. draws Gaussian posterior approximation + IS, use IS-ESS)
I guess we could assume that if iteration information is available, then the draws are from MCMC. But at the moment, we don't have support for independent (weighted) MC draws. Would it make sense to set the iteration to 1 for all independent draws? Other ideas for making the difference?
This issue is related to psis() function in loo package complaining if r_eff argument is not set. r_eff is used to pass the earlier computed (MCMC-ESS)/S. If we could determine whether the draws are from MCMC or MC, we would not need to complain in the latter case (and could compute r_eff internally in the first case)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the posterior package's draws objects and the four MCSE cases described in the issue, then inspect how psis() in loo uses the r_eff argument. The work is done when the project has a decided way to distinguish MCMC from MC draws, including weighted draws, and the relevant default behavior is defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100