stan-dev / example-models

Example models for Stan
http://mc-stan.org/
766 stars 478 forks source link

Update basic_distributions syntax #190

Closed andrjohns closed 3 years ago

andrjohns commented 3 years ago

I'm going to start (slowly & sporadically) updating the syntax in these example models to modern Stan language, and remove deprecated syntax.

This PR updates the models in the basic_distributions folder. I've checked that all models parse under Stanc3 (with the exception of a known issue

rok-cesnovar commented 3 years ago

Nice! Thanks!

Do you check using rstan 2.26? cmdstan adds a _model suffix and rstan should as well to avoid the problem.

andrjohns commented 3 years ago

Ah good call, yep no errors under RStan 2.26

andrjohns commented 3 years ago

Just for the example models I think I'd prefer to leave the matrix declarations in the matrix layout (rather than a one-liner), so that the [[],[]] declaration syntax is a bit more immediately intuitive for the unfamiliar. But will update the rest

rok-cesnovar commented 3 years ago

Yeah, its why I said these are optional. Let me know when to take another look.

andrjohns commented 3 years ago

Works for me! Ready for another look