stan-dev / docs

Documentation for the Stan language and CmdStan
https://mc-stan.org/docs/
Other
37 stars 107 forks source link

question - mismatch between SUG chapters #782

Open mitzimorris opened 3 months ago

mitzimorris commented 3 months ago

Summary:

question from Stan slack:

The section on Sparse data structures solves the problem of sparse data by converting the data to "long" format, and using a for-loop in the likelihood statement. It then goes on to state that using segment is better solving the related problem of ragged data structures, saying that "A full database type structure could be used, as in the sparse example, but this is inefficient, wasting space for unnecessary indices and not allowing vector-based density operations.". But, over in the section on multiple indexing, the example seems to be equivalent to the unvectorized Sparse data structure example. Am I missing something? Why can't we vectorize the likelihood for the sparse data example using multiple indexing?

Description:

Git blame shows that @bob-carpenter updated the multi-index chapter in 2021. sparse-ragged chapter is pretty much unchanged. should they both be updated?