Skip to content

Commit

Permalink
Merge pull request #2435 from stan-dev/feature/2336-manual-2.17
Browse files Browse the repository at this point in the history
updated manual for 2.17, fixes #2336
  • Loading branch information
Bob Carpenter authored Nov 18, 2017
2 parents 7e6903c + e9b4e77 commit b149386
Show file tree
Hide file tree
Showing 17 changed files with 702 additions and 327 deletions.
17 changes: 13 additions & 4 deletions src/docs/bibtex/all.bib
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
% a do-nothing command that serves a purpose
@preamble{ " \newcommand{\noop}[1]{} " }
@article{lancaster:2000,
title={The incidental parameter problem since 1948},
author={Lancaster, Tony},
journal={Journal of Econometrics},
volume={95},
number={2},
pages={391--413},
year={2000}
}

@manual{minpack:1980,
Address = {9700 South Cass Avenue, Argonne, Illinois 60439},
Author = {Jorge J. More, Burton S. Garbow, Kenneth E. Hillstrom},
Expand Down Expand Up @@ -36,7 +46,7 @@ @article{AhnertMulansky:2011
volume={1110.3397}
}

@article{DormandPrince:1980,
@article{DormandPrince:1980,
author={Dormand, John R and Prince, Peter J},
year={1980},
title={A family of embedded {R}unge-{K}utta formulae},
Expand Down Expand Up @@ -67,11 +77,11 @@ @inproceedings{SerbanHindmarsh:2005

@article{HoetingEtAl:1999,
title={Bayesian model averaging: a tutorial},
author={Hoeting, Jennifer A. and Madigan, David
author={Hoeting, Jennifer A. and Madigan, David
and Raftery, Adrian E and Volinsky, Chris T.},
journal={Statistical Science},
volume = {14},
number = {4},
number = {4},
pages={382--417},
year={1999}
}
Expand Down Expand Up @@ -1251,4 +1261,3 @@ @article{ZouHastie:2005
number = {2},
pages = {301--320}
}

16 changes: 15 additions & 1 deletion src/docs/stan-reference/acknowledgements.tex
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ \subsection*{Code and Doc Patches}
Jacob Egner,
Ashley Ford,
Jan Gl\"ascher,
Jan Gleixner,
Robert J.\ Goedman,
Danny Goldstein,
Tom Haber,
Expand Down Expand Up @@ -139,9 +140,11 @@ \subsection*{Code and Doc Patches}

Thanks for documentation bug reports and patches to:
alvaro1101 (GitHub handle),
andrasm (GitHub handle),
Avraham Adler,
Chris Anderson,
Asim,
Jens Astrom,
Jarret Barber,
Ryan Batt,
Frederik Beaujean,
Expand All @@ -152,13 +155,16 @@ \subsection*{Code and Doc Patches}
Portia Brat,
Arthur Breitman,
Eric C.~Brown,
Eric N.~Brown,
Juan Sebasti\'an Casallas,
Alex Chase,
Daniel Chen,
Roman Cheplyaka,
Andy Choi,
David Chudzicki,
Michael Clerx,
Marco Colombo,
Luis Damiano,
Andria Dawson,
daydreamt (GitHub handle),
Conner DiPaolo,
Expand All @@ -175,6 +181,7 @@ \subsection*{Code and Doc Patches}
Mauricio Garnier-Villarreal,
Christopher Gandrud,
Jonathan Gilligan,
Aaron Goodman,
John Hall,
David Hallvig,
David Harris,
Expand Down Expand Up @@ -205,15 +212,18 @@ \subsection*{Code and Doc Patches}
Tamas Papp,
Anders Gorm Pedersen,
Tomi Peltola,
Alex Perrone,
Andre Pfeuffer,
Sergio Polini,
Joerg Rings,
Sean O'Riordain,
Brendan Rocks,
David M.\ Rogers,
Cody Ross,
Mike Ross,
Tony Rossini,
Nathan Sanders,
Massimo Santini,
James Savage,
Terrance Savitsky,
Dan Schrage,
Expand All @@ -222,23 +232,27 @@ \subsection*{Code and Doc Patches}
Janne Sinkkonen,
skanskan (GitHub handle),
Yannick Spill,
Trey Spiller,
sskates (GitHub handle),
ssp3nc3r (GitHub handle),
Martin Stjernman,
Dan Stowell,
Alexey Stukalov,
Dougal Sutherland,
John Sutton,
Maciej Swat,
Jonathan Sweeney,
J.~Takoua,
Andrew J.~Tanentzap,
Shravan Vashisth,
Aki Vehtari,
Lukas Vermeer,
Damjan Vukcevic,
Matt Wand,
Amos Waterland,
Sebastian Weber,
Sam Weiss,
Luke Wiklendt,
Lukasz Wiklendt,
wrobell (GitHub handle),
Howard Zail,
Jon Zelner, and
Expand Down
16 changes: 7 additions & 9 deletions src/docs/stan-reference/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ \subsection{Auxiliary Momentum Variable}
for details of the geometry.

In Stan, this matrix may be set to the identity matrix (i.e., unit
diagonal) or estimated from warmup samples and optionally restricted
diagonal) or estimated from warmup draws and optionally restricted
to a diagonal matrix. The inverse $\Sigma^{-1}$ is known as the mass
matrix, and will be a unit, diagonal, or dense if $\Sigma$ is.

Expand Down Expand Up @@ -384,7 +384,7 @@ \subsection{Discretization-Interval Adaptation Parameters}
By setting the target acceptance parameter $\delta$ to a value closer
to 1 (its value must be strictly less than 1 and its default value is
0.8), adaptation will be forced to use smaller step sizes. This can
improve sampling efficiency (effective samples per iteration) at the
improve sampling efficiency (effective sample size per iteration) at the
cost of increased iteration times. Raising the value of $\delta$ will
also allow some models that would otherwise get stuck to overcome
their blockages.
Expand Down Expand Up @@ -729,15 +729,15 @@ \section{Divergent Transitions}
random walk and biasing estimates by not being able to thoroughly
explore the posterior distribution. \cite{Betancourt:2016b} provides
details of the theory, computation, and practical implications of
divergent transitions in Hamiltonian Monte Carlo.
divergent transitions in Hamiltonian Monte Carlo.

The Stan interfaces report divergences as warnings and provide ways to
access which iterations encountered divergences. ShinyStan provides
visualizations that highlight the starting point of divergent
transitions to diagnose where the divergences arise in parameter
space. A common location is in the neck of the funnel in a centered
parameterization (as in the funnel example discussed in
\refsection{reparameterization}).
\refsection{reparameterization}).

If the posterior is highly curved, very small step sizes are required
for this gradient-based simulation of the Hamiltonian to be accurate.
Expand Down Expand Up @@ -1341,7 +1341,7 @@ \section{Unit Vector}\label{unit-vector.section}
if it has unit Euclidean length, so that
%
\[
\Vert x \Vert
\Vert x \Vert
\ = \ \sqrt{x^{\top}\,x}
\ = \ \sqrt{x_1^2 + x_2^2 + \cdots + x_n^2}
\ = \ 1\ .
Expand Down Expand Up @@ -2155,15 +2155,15 @@ \section{Stochastic Gradient Ascent}
\subsection{Monte Carlo Approximation of the ELBO}

ADVI uses Monte Carlo integration to approximate the variational
objective function, the ELBO. The number of samples used to
objective function, the ELBO. The number of draws used to
approximate the ELBO is denoted by \texttt{elbo\_samples}. We
recommend a default value of $100$, as we only evaluate the ELBO every
\texttt{eval\_elbo} iterations, which also defaults to $100$.

\subsection{Monte Carlo Approximation of the Gradients}

ADVI uses Monte Carlo integration to approximate the gradients of the
ELBO. The number of samples used to approximate the gradients is
ELBO. The number of draws used to approximate the gradients is
denoted by \texttt{grad\_samples}. We recommend a default value of
$1$, as this is the most efficient. It also a very noisy estimate of
the gradient, but stochastic gradient ascent is capable of following
Expand Down Expand Up @@ -2256,5 +2256,3 @@ \section{Speed Warning and Data Trimming}
very long time, especially in models with latent parameters that grow
with the data size. It can be helpful to diagnose a model with smaller
data sizes in such cases.


16 changes: 7 additions & 9 deletions src/docs/stan-reference/appendices.tex
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ \chapter{Stan for Users of BUGS}\label{stan-for-bugs.appendix}
Bugs.

To start, take a look at the files of translated \BUGS models at
\url{http://mc-stan.org/}. These are 40 or so models from the \BUGS
\url{http://mc-stan.org}. These are 40 or so models from the \BUGS
example volumes, all translated and tested (to provide the same
answers as \BUGS) in Stan. For any particular model you want to fit,
you can look for similar structures in these examples.
Expand Down Expand Up @@ -526,13 +526,13 @@ \section{Some Differences when Running from R}

\item Stan can be set up from within R using two lines of code.
Follow the instructions for running Stan from R on
\url{http://mc-stan.org/}. You don't need to separately download
\url{http://mc-stan.org}. You don't need to separately download
Stan and RStan. Installing RStan will automatically set up Stan.
When RStan moves to CRAN, it will get even easier.
\item In practice we typically run the same Stan model repeatedly. If
you pass RStan the result of a previously fitted model the model will
not need be recompiled. An example is given on the running
Stan from R pages available from \code{http://mc-stan.org/}.
Stan from R pages available from \code{http://mc-stan.org}.
\item When you run Stan, it saves various conditions including
starting values, some control variables for the tuning and running
of the no-U-turn sampler, and the initial random seed. You can
Expand Down Expand Up @@ -560,7 +560,7 @@ \section{The Stan Community}
\begin{itemize}
\item Stan, like WinBUGS, OpenBUGS, and JAGS, has an active community,
which you can access via the user's mailing list and the developer's
mailing list; see \code{http://mc-stan.org/} for information on
mailing list; see \code{http://mc-stan.org} for information on
subscribing and posting and to look at archives.
\end{itemize}

Expand Down Expand Up @@ -663,7 +663,7 @@ \subsection{Expressions}
\small
\begin{Verbatim}[fontsize=\small]
expressions ::= expression % ','
expression ::= numeric_literal
expression ::= real_literal
| variable
| '{' expressions '}'
| expression `?` expression `:` expression
Expand All @@ -687,8 +687,6 @@ \subsection{Expressions}
indexes ::= index % ','
numeric_literal ::= integer_literal | real_literal
integer_literal ::= 0 | [1-9] [0-9]*
real_literal ::= integer_literal ?('.' [0-9]*) ?exp_literal
Expand All @@ -715,8 +713,8 @@ \subsection{Statements}
| 'target' '+=' expression
| 'break'
| 'continue'
| 'print' '(' (expression | string_literal)% ',' ')'
| 'reject' '(' (expression | string_literal)% ',' ')'
| 'print' '(' (expression | string_literal) % ',' ')'
| 'reject' '(' (expression | string_literal) % ',' ')'
| 'return' expression
| ''
Expand Down
10 changes: 4 additions & 6 deletions src/docs/stan-reference/contributed.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ \part{Contributed Modules}
\chapter{Contributed Modules}

\noindent
Stan is an open-source project and welcomes user contributions.
Stan is an open-source project and welcomes user contributions.

In order to reduce maintenance on the main trunk of Stan development
and to allow developer-specified licenses, contributed Stan modules
Expand All @@ -16,10 +16,10 @@ \section{Contributing a Stan Module}
Stan developers either through one of the following.
%
\begin{itemize}
\item \code{stan-users} mailing list:
\item Stan forums:
\\
\url{https://groups.google.com/forum/?fromgroups#!forum/stan-users}
\item Stan e-mail:
\url{http://discourse.mc-stan.org}
\item Stan e-mail:
\\
\href{mailto:[email protected]}{\tt [email protected]}
\end{itemize}
Expand Down Expand Up @@ -58,5 +58,3 @@ \subsection{Emacs Stan Mode}
{\it Authors:} & Jeffrey Arnold, Daniel Lee
\end{tabular}
\end{quote}


7 changes: 1 addition & 6 deletions src/docs/stan-reference/distributions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ \section{Cumulative Distribution Functions}
\ = \
\mbox{Pr}[Y < y]
\ = \
\int_{-\infty}^y p(y \, | \, \theta) \ \mathrm{d}\theta.
\int_{-\infty}^y p(y \, | \, \theta) \ \mathrm{d}y.
\]
The complementary cumulative distribution function (CCDF) is defined
as
Expand Down Expand Up @@ -2931,8 +2931,3 @@ \subsubsection{Stan Functions}
freedom \farg{nu} and symmetric and positive-definite scale matrix
\farg{Sigma}; may only be used in generated quantities block}
\end{description}





Loading

0 comments on commit b149386

Please sign in to comment.