Stan should accumulate the mean and variance for all unknowns
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.8k
- Forks
- 388
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 15
Description
Summary:
RStan has for a long time calculated the mean for all unknowns, even those that are not returned to R. But this (and the variance) should not be the responsibility of the interfaces.
Description:
At each unthinned iteration after warmup, the (constrained) parameters, transformed parameters, and generated quantities should be run through Welford accumulators to build up the posterior means and variances.
I am not sure how best to pass these means and variances back to the calling function when the sampling is done but we can figure that out later.
Reproducible Steps:
Cannot be done currently
Current Output:
Cannot be done currently
Expected Output:
A std::vector<double> of means and a std::vector<double> of variances.
Additional Information:
None
Current Version:
v2.16.0
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
No source files, tests, or entry points are identified in the issue. First clarify where the sampling result is assembled and how means and variances should be returned, then define completion as accumulating constrained values for every unthinned post-warmup iteration and exposing both vectors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100