Stan Community

@mc-stan

Public team

Joined on Jan 30, 2021

  • Martin's idea for a student project Call 2020-12-05: Martin Modrák, Dan Simpson, Aki mgcv now has (something like) INLA in it. Not sure if it has samples Dan thinks inlabru is more suitable Correlated random effects are a problem (for INLA, not sure if mgcv)
     Like  Bookmark
  • It would help me a lot if you could try if you can install the package on your system and run some examples (or your own code using the package, if you have it) to avoid pushing a relase that breaks on some systems. Docs for the release candidate: http://popelka.ms.mff.cuni.cz/~cerny/SBC-RC/ Installing the release candidate of the package: remotes::install_github("hyunjimoon/SBC", ref = "v0.1.0-RC1") Running a minimalist example: library(SBC)
     Like  Bookmark
  • A big advantage of Stan is that it employs a range of diagnostics to let you notice many potential problems with your model --- Stan is conservative and throws warnings for anything suspicious. Here we walk through the types of warnings and hints to help you diagnose and resolve underlying modelling problems. If you fail to diagnose/resolve the problems with the model yourself or if you have trouble understanding or applying some of the hints, don't worry, you are welcome to ask on Stan Discourse, we'll try to help! Resolving modeling issues is generally hard and requires some understanding of probabilistic theory and Hamiltonian Monte-Carlo, see Understanding basics of Bayesian statistics and modelling for more general resources. For guidance on warnings that occur when compiling the model, see Stan User's guide on errors and warnings. When can warnings be ignored In most cases the warnings actually indicate important problems with your model. This does not mean that every time you see a warning the model estimates are meaningless, but when you see warnings you shouldn't trust your estimates without first understanding what the warnings mean. However, in early stages of a modelling workflow, we often don’t need completely reliable inference, and a roughly correct posterior can be enough to let us check if the model is sensible using posterior predictive checks. If warnings occur rarely or the diagnostics are just somewhat above the recommended threshold, it often makes sense to do some rough sanity checks before investigating the warnings in detail. This can help to avoid investing a lot of time debugging a model that would be discarded anyway due to lack of fit to data or other conceptual problems.
     Like  Bookmark
  • Appendix: How divergences arise (Code for the examples is at https://gist.github.com/martinmodrak/7f2111e8ed4eeac12f87f9bb3dc947a9) TODO: this part still requires additional work, so will maybe not be part of a first "release" TODO: maybe display velocity as primary quantity (because velocity is where the error is) In each iteration of a Hamiltonian Monte Carlo algorithm, we simulate trajectory of a frictionless particle over a surface defined by the negative logarithm of our target density. Since we cannot do this exactly, we approximate the trajectory by taking multiple small discrete steps. Here's how this can look like for a log density of a single univariate normal distribution (which is just a quadratic curve): The points represent the location of the particle at each step and the horizontal blue line represents the immediate momentum of the particle. We see that as the particle moves upwards, it gains momentum, then deccelerates as it moves upwards and finally starts moving back. This makes intuitive sense: we want the sampler to be attracted towards regions with high density.
     Like  Bookmark
  • Ask for permission to share recordings before conference Prepare feedback form before conference
     Like  Bookmark
  • General notes: When you are on stage and the session is on, you are visible! "Hide yourself from stage" You can (hopefully) turn-off other people's mic/cam If no questions from audience, start Q&A with a simple question (that can be answered quickly) Before starting:
     Like  Bookmark
  • For a while we've been aware that the current structure of the forums is not ideal. So we'd like to restructure the forums to make them more usable for everybody. The main tools we have for this are the category/subcategory structure, tags and the default view for the home page. One of the reasons I've put off this for quite some time is that this is going to be a difficult task. I think the biggest problem with the current structure is that categories don't neatly map to what people actually need and it is thus hard to follow just the topics one is interested in. The relatively high volume of questions of users seeking help can also make the rarer but important discussions about development/governance/... harder to notice. From the question-asker side, it is often not clear how to categorize a given inquiry as it may e.g. involve both a specific interface and a modelling problem. To start the process, I'd like to gather the usage scenarios we have for the forums and some basic considerations on their requirements. Discussion on changing how the forum work should then follow from those scenarios. I'd be very glad to get your feedback on how you use the forums or how you think other people use the forums (we are unlikely to get a lot of specific feedback from novice users) Here are the usage scenarios I've come up so far:
     Like  Bookmark
  • The conference will be held via the Airmeet platform. Below is your personal invitation link that you can use to access the event as a speaker. <> To make sure the conference runs smoothly we kindly remind those who haven't yet sent us their pre-recorded presentation to do so :-) Additionally, we kindly ask you to join one of the practice runs (~20 minutes) at either Thursday 26th or Friday 27th, the same time as conference (9am EST), we'll walk you through the platform and check your setup will work for the live Q&A. If you can't make either of those dates, let me know, and we'll figure something out :-)
     Like  Bookmark
  • @Breck Baldwin: Working on COVID paper with Jose, Andre,
     Like  Bookmark
  • @breckbaldwin Got SIRD model working finally with tweets/deaths and simulate data. Need to meet with Jose.
     Like  Bookmark
  • @bparbhu started a discussion on integrating CmdStanPy with Dask (https://github.com/dask/dask-ml/issues/837) for easy cloud/multiprocessing integration in @breckbaldwin, left columbia, working on CoDatMo.
     Like  Bookmark
  • @breckbaldwin Got deep learning and bayesian methods draft posted, https://discourse.mc-stan.org/t/deep-learning-and-bayesian-modeling-citation-comparision-surprising-to-me-comments-sought/22661 @rok: release candidate, investigating a perf. regression, brms OpenCL support just merged
     Like  Bookmark
  • Faster posterior::summarise_draws() for large fits; parallelization coming very soon. New vignettes for posterior coming soon mrpkit repository is public (in Mitzi's github) but not yet released or officially supported (getting close though). The package assists with MRP workflow and currently supports rstanarm, brms, and lme4. Initial alpha/beta release likely this summer at some point. Preparing rstanarm release with a lot of bug fixes and a few new features
     Like  Bookmark
  • @breckbaldwin: CZI proposal nearly done, resloved licenseing around multiple contributions to source code with NumFOCUS lawyer. Will post to discourse. @Rok: prepping for the release (checking open projects, preparing release notes, RC blurbs, etc.), reviewing Steve's varmat branch, miscelaneous minor things @martinmodrak: Asked if we don't want to have a separate jacobian += statement (optimization turns off Jacobian), but also for documenting. I promised to follow-up on Discourse se here's the thread: https://discourse.mc-stan.org/t/allow-users-to-declare-terms-as-jacobian/22479
     Like  Bookmark
  • Automatic Guide Generation for Stan via NumPyro Guillaume Baudart and Louis Mandel made some experiments of running the autoguides of NumPyro on the PosteriorDB models using the Stan to NumPyro compiler: paper: https://github.com/deepppl/evaluation-autoguide/blob/main/stan-numpyro-autoguides.pdf code: https://github.com/deepppl/evaluation-autoguide Feedback welcome! cmdstanr supports diagnose method now Jonah and Mitzi reviewed and merged Rok's PR adding CmdStan's diagnose method (comparing Stan's gradients to finite diffs) to CmdStanR: https://github.com/stan-dev/cmdstanr/pull/485
     Like  Bookmark
  • Current plan: have this in the user's guide. unite all warnings, then specific advice for divergences/treedepth/ESS/Rhat Which suggestions are most useful for which type of warning? Few divergences: increase adapt_delta Short computation + treedepth: increase treedepth Build on https://mc-stan.org/docs/2_26/reference-manual/divergent-transitions.html and https://mc-stan.org/misc/warnings.html
     Like  Bookmark
  • rvars in E posterior package Matthew Kay's rvars new datatype in posterior (pull request) makes it easy to do, e.g., > rv = as_draws_rvars(fit_lin$draws()) > mu = rv$alpha + rv$beta*data_lin$year > bayesR2 = rvar_var(mu) / (rvar_var(mu) + rv$sigma^2) > bayesR2 rvar<1000,4>[1] mean ± sd: [1] 0.097 ± 0.062
     Like  Bookmark
  • # Stan: The Gathering April 15th
     Like  Bookmark
  • @martinmodrak, @avehtari, @andrewgelman and @jonah are planning to try to write a more documentation-like guide what one can do about divergences/treedepth/... If you want to join the actual writing, let us know (we will also ask for feedback once we have something written) @breck CoDatMo work.
     Like  Bookmark
  • @martinmodrak : Notes from last time to check, if it is OK to publish https://hackmd.io/-3W345C1SHe2TQC-gJGsjw https://github.com/pgree/fastNoNo CmdStanPy - random variables https://cmdstanpy.readthedocs.io/en/v0.9.75/api.html#cmdstanpy.CmdStanMCMC.stan_variable @benb
     Like  Bookmark