Giter Site home page Giter Site logo

waternk / stan-book Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avehtari/stan-book

0.0 2.0 0.0 32.57 MB

Repository for book "Bayesian Statistics Using Stan", text files in Rmarkdown, plus example data, Stan models, and scripts

License: Other

R 5.65% TeX 49.35% Shell 0.15% Stan 39.95% CSS 4.89%

stan-book's Introduction

The Stan Book

This is the repository for *Bayesian Statistics Using Stan", which serves as both the Stan users' guide and an introduction to Bayesian statistics.

Directory Structure

  • *.Rmd files: basic text
  • _bookdown.yml: book includes
  • _output.yml: output config
  • bib/all.bib: BibTeX file for references
  • stan/*.Stan : directory of Stan programs
  • data/{*.R, *.rds} : directory for data used by programs
  • programs/{*.R, *.stan} : legacy programs from old manual (deprecated until they're moved into new style with R inline in .Rmd)

Building the Book from Source

You will need to have RStan installed in the R environment from which you build.

RStudio

In RStudio: to build the project, open index.Rmd in RStudio and click knit - change output on first line of index.Rmd for gitbook and pdf_book (not differeing _)

Outside of RStudio

First, you will need to install pandoc and pandoc-citeproc in addition to the bookdown package in R. After that, it can be built from within R in this directory using bookdown::render('index.Rmd') or from the shell using ./build.sh to build both PDF and HTML versions.

Style Guide for Authors

  • All lines should be 80 or fewer characters unless absolutely mandated by content

  • y ~ normal(mu, sigma) # Not: N(), not sigma^2, regular font for "normal", Latex math for $y$, $\mu$, $\sigma$

  • norma(y | mu, sigma) # Vertical bar, not semicolon

  • Poisson, Weibull, LKJ # Use capital letters for distributions that are named after people

  • E(y) # Regular font, parentheses not brackets

  • () # Always parentheses, never brackets

  • No special fonts for distributions, just latex roman and math fonts

  • p(y) # Probability density and probability mass function

  • Pr(A) # probability of an event

  • Follow the Stan style guide for code

    • int<lower = 0> N; # Put in the lower bound
    • for (n in 1:N); # Not: for (i in 1:n);
    • foo_bar # Underscores rather than dots or CamelCase
  • No R/Python code in the finished book except in appendix

  • All Stan code should be best practice except when explaining something, in which case we should explicitly show the best-practice alternative

Licensing

The code is licensed under BSD-3 and the text under CC-BY ND 4.0.

stan-book's People

Contributors

mitzimorris avatar

Watchers

James Cloos avatar water@nankai 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.