stan-dev / stan-dev/posterior

Computing Monte Carlo Standard Error for an arbitrary function

Open
#57 10 comments 0 reactions 1 assignee View on GitHub

@MansMeg is already working on this.

Since Jan 3, 2020.

feature
Dominant language
R
Stars
171
Forks
26
Avg merge
2d 18h
Merged PRs (30d)
3

Description

Hi!

Me, @paul-buerkner and @avehtari discussed the need for computing the MCSE for different functions of interest, such as the marginal variances, skewness and kurtosis of individual parameters. I think this functionality is probably best to implement directly into the posterior package. Aki suggested to use the batch means and subsampling approaches of https://projecteuclid.org/download/pdfview_1/euclid.ejs/1417615759 and I could implement this into posterior since I need to implement it anyway.

The most important part for me to know is how you would like the API to look. This is my first suggestion, feel free to comment or come up with a better suggestion.

monte_carlo_standard_error(x, FUN = mean)

where x is a draws object and FUN is an arbitrary function that operates on the individual parameters (rv?) of the draws object. It returns an object similar to summary() but with column with the names:
[parameter_name]_[function_name] and [parameter_name]_[function_name]_se

Any thoughts or comments before I get started?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.