# General question on how does Stan update parameters

**URL:** <https://discourse.mc-stan.org/t/general-question-on-how-does-stan-update-parameters/29103>\
**Category:** General\
**Created:** [October 11, 2022, 5:35pm UTC](https://discourse.mc-stan.org/t/general-question-on-how-does-stan-update-parameters/29103 "2022-10-11T17:35:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgeorgios](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgeorgios/32/15151_2.png) [@bgeorgios](https://discourse.mc-stan.org/u/bgeorgios)\
**Post date:** [October 11, 2022, 5:35pm UTC](https://discourse.mc-stan.org/t/general-question-on-how-does-stan-update-parameters/29103/1 "2022-10-11T17:35:49Z")

</div>

Hi all,

I’m new to Stan and I’d like your insight on how Stan works. So my question is: Let’s assume I have a Bayesian Hierarchical Model with **x** number of parameters. Does Stan use the Hamiltonian system of equations to update all parameters at once? Or, say, it updates them one-at-a-time? Maybe in blocks of parameters?

I would appreciate your knowledge on this one.

Thanks,  
Georgios

---

<div class="post-metadata">

**Author:** ![nhuurre](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@nhuurre](https://discourse.mc-stan.org/u/nhuurre)\
**Post date:** [October 11, 2022, 7:48pm UTC](https://discourse.mc-stan.org/t/general-question-on-how-does-stan-update-parameters/29103/2 "2022-10-11T19:48:09Z")

</div>

> [@bgeorgios](#):
>
> Does Stan use the Hamiltonian system of equations to update all parameters at once?

Yes, all parameters are updated at once.

See [Stan Reference Manual](https://mc-stan.org/docs/reference-manual/hamiltonian-monte-carlo.html) for a summary of the algorithm and Michael Betancourt’s [Conceptual Introduction to Hamiltonian Monte Carlo](https://arxiv.org/abs/1701.02434) for an in-depth discussion.

---

<div class="post-metadata">

**Author:** ![bgeorgios](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgeorgios/32/15151_2.png) [@bgeorgios](https://discourse.mc-stan.org/u/bgeorgios)\
**Post date:** [October 11, 2022, 7:49pm UTC](https://discourse.mc-stan.org/t/general-question-on-how-does-stan-update-parameters/29103/3 "2022-10-11T19:49:41Z")

</div>

Thanks, much appreciated!
