Coder Social home page Coder Social logo

schuetzingit / example-models Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stan-dev/example-models

0.0 0.0 0.0 215.58 MB

Example models for Stan

Home Page: http://mc-stan.org/

Shell 0.01% R 28.18% CSS 0.01% TeX 0.04% Makefile 0.05% HTML 69.89% Jupyter Notebook 0.38% Stan 1.45%

example-models's Introduction

Example Models

This repository holds open source Stan models, data simulators, and real data. There are models translating those found in books, most of the BUGS examples, and some basic examples used in the manual.

Books

BUGS examples

Basics

  • Basic Distributions
  • Basic Estimators

Organization

Each example model should be organized to include the following

  1. Stan program(s) implementing the model (and variants),
  2. program to simulate data (in R or Python),
  3. simulated data file itself (for now in .data.R dump format). For each Stan file(s), such as foo.stan and bar.stan, there must be a foo.data.R file and a bar.data.R file in the same subdirectory as the .stan file (even if foo.data.R is the same as bar.data.R).
  4. summary of output fit for simulated data file (text), (a) check diagnostics for post-warmup iterations: n_divergent is zero for all post-warmup iterations, tree_depth < max_depth for all post-warmup iterations, (b) check for all parameters (and unnormalized density lp__) that R_hat < 1.1 and n_eff > 20, and (c) if diagnostics fail improve model with a note explaining the fix.
  5. any real data sets with summary of fit (in original and Stan-readable format, with munging program from original to Stan-readable), (a) check diagnostics (as above), (b) check convergence (as above), and (c) if fit is poor then improve model with a note explaining the fix.
  6. citations to source for model and/or data,
  7. documentation needed to understand the model (LaTeX, text, or HTML), including discussion of parameterizations and/or optimizations and their relations to performance (and to each other if there are multiple models),
  8. keywords or other tags to help organize by category (e.g., from manual, from BUGS volume, from book, involving logistic regression, application area such as population model, model type such as IRT or mark-recapture, etc.)
  9. author/copyright-holder info and open-source license info if not new BSD.

The idea is to encourage people to go through all of these steps for their models, particularly 3 and 4, which often get overlooked. And if the example cannot be executed via rstan::stan_demo(), then something is wrong.

Licensing

All of the example models are copyrighted by their author(s) or assignees under the new BSD license unless another open-source license is explicitly stipulated in the directory containing the model.

example-models's People

Contributors

mitzimorris avatar peterli2016 avatar bgoodri avatar syclik avatar ito4303 avatar maverickg avatar danielcfurr avatar bbbales2 avatar martin-smira avatar schuetzingit avatar rok-cesnovar avatar philclemson avatar jgabry avatar ericnovik avatar seantalts avatar charlesm93 avatar andrewgelman avatar dmenne avatar rtrangucci avatar education-stan avatar wardbrian avatar jrnold avatar bob-carpenter avatar avehtari avatar singmann avatar randommm avatar dpsimpson avatar alecksphillips avatar raerickson avatar matthewdhoffman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.