stan-dev / stan

Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
2.57k stars 368 forks source link

next manual, 2.8.0++ #1617

Closed bob-carpenter closed 8 years ago

bob-carpenter commented 8 years ago

This is where updates for the manual for the next release go if they are not related to a pull request (new features, bug fixes, etc.)

bob-carpenter commented 8 years ago
bob-carpenter commented 8 years ago

Julian King points out:

p(y | lambda) = Poisson(y | lambda) / (1 - PoissonCDF(0 | lambda))
so log p = log_Poisson(y | lambda) - log(1 - PoissonCDF(0 | lambda))
 = log_Poisson(y | lambda) - log(1 - exp(-lambda)
 = log_Poisson(y | lambda) - log1m_exp(-lambda)
bob-carpenter commented 8 years ago
bob-carpenter commented 8 years ago

From Joachim Vandekerckhove on stan-users:

Sorry I'm a little late to this party, I had a long summer of travel. The reason we originally implemented the lower-bound hits as negative reaction times was to have a cheap way of encoding what is essentially a bivariate distribution (strictly positive RT and binary response). Because both the RT and the outcome are random variables, the current implementation (with only one bound) isn't entirely satisfactory if at any point we want to generate random numbers from the distribution.

I always liked the negative-RT solution even though it's a little counter-intuitive. I'd probably prefer it in Stan since it's how it works in JAGS... but the more conventional solution would be to make it actually bivariate, and let it operate on a [RT response] pair, where the first is a strictly positive real and the second is a boolean.

bob-carpenter commented 8 years ago

Howard Zail points out on stan-users:

Most of the hyperlinks in the Stan Manual seem to be broken. In particular, I am looking for the http://mc-stan.org/examples.html page. This link is also broken on the mc-stan website.
bob-carpenter commented 8 years ago

Organize examples from manual on stan-dev/example-models better

This is really going to have to be done on that repo, I think, because they're no longer part of the manual directory itself.

bob-carpenter commented 8 years ago

José Rojas Echenique reports:

Section 1.6 (p25) and 1.8 (p26) are both titled Variational Inference.

Also,

( moved here from #1629 )

bob-carpenter commented 8 years ago

Ashley Ford reported in another issue: https://github.com/stan-dev/stan/issues/1637

My understanding now is that the actual integration time is

stepsize * round(int_time / stepsize)

usually slightly less than int_time

bob-carpenter commented 8 years ago
randommm commented 8 years ago
maciekjswat commented 8 years ago

There is a typo in the manual 2.8.0, section '48.6. Multivariate Student-t Distribution', in the PDF formula It is: \Gamma \chi ((... it should be: \Gamma ((...

bob-carpenter commented 8 years ago
bob-carpenter commented 8 years ago
bob-carpenter commented 8 years ago

From Andre Pfeuffer on stan-users:

Also see: https://github.com/stan-dev/stan/issues/485

bob-carpenter commented 8 years ago
bob-carpenter commented 8 years ago
bob-carpenter commented 8 years ago
bob-carpenter commented 8 years ago
bob-carpenter commented 8 years ago

From Ryan Batt on issue #1691:

Should y[2,4] = 0 instead be y[2,4]=1?

Page 136 of Manual v2.80, the very end of the caption for Figure 12.1. It's about the data base representation of a sparse matrix.

bob-carpenter commented 8 years ago

From Ryan Batt on issue #1692:

At the top of page 138 of manual 2.80, The 6th element of z should be 12.9 (not 129):

screen shot 2015-11-16 at 3 13 59 pm

Also, I just realized this is Figure 12.2.

bob-carpenter commented 8 years ago
rBatt commented 8 years ago

Page 224 of the manual, section 21 (Reproducibility). The word "on" is repeated twice in the following:

It doesn’t matter if you use a stable release version of Stan or the version with a particular Git hash tag. The same goes for all of the interfaces, compilers, and so on on.

This is the first paragraph after the list.

botanize commented 8 years ago

Page 84:

The data is declared in the same way as the other time-series regressions. Here the are parameters for the mean output mu and error scale sigma, as well as regression coefficients phi for the autoregression and theta for the moving average component of the model.

It's unclear what the purpose of this paragraph is, it seems to point out the obvious. The second sentence is particularly unclear and at a minimum suffers from a typo ("the are").

jonathan-g commented 8 years ago

p. 37, definition of cholesky_factor_corr is unclear. "length of each row is 1." Length so commonly refers to the number of elements that maybe it would be good, for clarify, to say instead that each row is a unit vector.

rBatt commented 8 years ago

Section 5.8 "Hierarchical Logistic Regression", last line on page 56:

... an approach would no pooling assigns each level l its own coefficient ...

"would" should be changed to "with", I believe.

jonathan-g commented 8 years ago

In the ARMA(1,1) models (p. 84): MA and ARMA models are not identifiable if the roots of the characteristic polynomial for the MA part lie inside the unit circle, so it's necessary to add the constraint

real<lower = -1, upper = 1> theta;

When I run the model as it appears in the manual, without the constraint, using synthetic data from arma.sim, the simulation can sometimes find modes for (theta,phi) outside the [-1,1] interval, which creates a multiple mode problem in the posterior and also causes the NUTS treedepth to get very large (often > 10). Adding the constraint both improves the accuracy of the posterior and dramatically reduces the treedepth, which speeds up the simulation considerably (typically by much more than an order of magnitude).

Further, unless one thinks that the process is really non-stationary, it's worth adding an additional constraint

read<lower = -1, upper = 1>phi;

to ensure causality (stationarity).

bob-carpenter commented 8 years ago

David Manheim on stan-users suggests:

brendan-r commented 8 years ago

Very minor:

The parameter for segment on a row_vector is v in the specification, and rv in the description.

bob-carpenter commented 8 years ago

@brendan-R: thanks, I'm moving this to 2.9.0++ since 2.9.0 already got tagged.