# \#algorithms

**URL:** https://discourse.mc-stan.org/tag/algorithms/35.md

[Latest](https://discourse.mc-stan.org/latest.md) · [Categories](https://discourse.mc-stan.org/categories.md) · [Tags](https://discourse.mc-stan.org/tags.md)

---

## [Pathfinder failure without hint why it failed](https://discourse.mc-stan.org/t/pathfinder-failure-without-hint-why-it-failed/37248)

<div class="topic-metadata">

**Author:** [@Benjamin\_Kambs](https://discourse.mc-stan.org/u/Benjamin_Kambs)\
**Replies:** 12\
**Last updated:** [November 19, 2024, 8:35pm UTC](https://discourse.mc-stan.org/t/pathfinder-failure-without-hint-why-it-failed/37248 "2024-11-19T20:35:12Z")

</div>

Hello there! I am currently modifying Facebook’s Prophet to my needs. In contrast to Prophet I use the Pathfinder algorithm which works in most cases. However, I encounter an error on some occasions. The error doesn’t t…

---

## [MAP + arm::sim() like posteriors as option for approximate Bayes in Stan](https://discourse.mc-stan.org/t/map-arm-sim-like-posteriors-as-option-for-approximate-bayes-in-stan/34768)

<div class="topic-metadata">

**Author:** [@Angelo\_D\_Ambrosio](https://discourse.mc-stan.org/u/Angelo_D_Ambrosio)\
**Replies:** 3\
**Last updated:** [April 27, 2024, 12:02pm UTC](https://discourse.mc-stan.org/t/map-arm-sim-like-posteriors-as-option-for-approximate-bayes-in-stan/34768 "2024-04-27T12:02:08Z")

</div>

I often find that MAP estimation (e.g. based on the blme package in R) + posterior simulation via arm::sim() produce posteriors that are very similar to full Stan sampling, at least for simple linear models. For example: …

---

## [NUTS and ridges](https://discourse.mc-stan.org/t/nuts-and-ridges/27282)

<div class="topic-metadata">

**Author:** [@PhilClemson](https://discourse.mc-stan.org/u/PhilClemson)\
**Replies:** 20\
**Last updated:** [November 21, 2023, 6:51pm UTC](https://discourse.mc-stan.org/t/nuts-and-ridges/27282 "2023-11-21T18:51:31Z")

</div>

Hi everyone, I’m currently using NUTS (not Stan but my own implementation) to sample from a distribution which describes the probability of the parameters \\theta\_n for a set of sinusoidal basis functions, given some tim…

---

## [Handling multimodality in HMC/Stan - tempering & NUTS?](https://discourse.mc-stan.org/t/handling-multimodality-in-hmc-stan-tempering-nuts/31841)

<div class="topic-metadata">

**Author:** [@siliz4](https://discourse.mc-stan.org/u/siliz4)\
**Replies:** 4\
**Last updated:** [June 24, 2023, 10:35pm UTC](https://discourse.mc-stan.org/t/handling-multimodality-in-hmc-stan-tempering-nuts/31841 "2023-06-24T22:35:34Z")

</div>

I’m working on a embedding model that seems to suffer from a large number of isolated local maxima. I’m currently trying to recover the original coordinates of a dataset generated synthetically, but chains initialized ra…

---

## [Prior information about parameters as sample draws](https://discourse.mc-stan.org/t/prior-information-about-parameters-as-sample-draws/31294)

<div class="topic-metadata">

**Author:** [@patternseekerRr](https://discourse.mc-stan.org/u/patternseekerRr)\
**Replies:** 0\
**Last updated:** [May 4, 2023, 1:26pm UTC](https://discourse.mc-stan.org/t/prior-information-about-parameters-as-sample-draws/31294 "2023-05-04T13:26:57Z")

</div>

Hello, I want to construct a simple normal regression model. However, my prior information about beta0, beta1, and sigma is not in a closed analytical form (no specific distribution). Instead, I have 20,000 draws for ea…

---

## [Details on how Stan adaptively tunes the HMC parameters? (i.e. mass matrix, step size and leapfrog steps)](https://discourse.mc-stan.org/t/details-on-how-stan-adaptively-tunes-the-hmc-parameters-i-e-mass-matrix-step-size-and-leapfrog-steps/30452)

<div class="topic-metadata">

**Author:** [@CerulloE](https://discourse.mc-stan.org/u/CerulloE)\
**Replies:** 4\
**Last updated:** [February 20, 2023, 1:23pm UTC](https://discourse.mc-stan.org/t/details-on-how-stan-adaptively-tunes-the-hmc-parameters-i-e-mass-matrix-step-size-and-leapfrog-steps/30452 "2023-02-20T13:23:12Z")

</div>

I was wondering if anybody knew where I could find out details of how Stan adaptively tunes the three HMC parameters: Step size number of leapfrog steps mass matrix (aka the ‘metric’) I asked Michael Betancourt (@beta…

---

## [Recommendations for problem-specific Stan-esque dynamic HMC implementation](https://discourse.mc-stan.org/t/recommendations-for-problem-specific-stan-esque-dynamic-hmc-implementation/27128)

<div class="topic-metadata">

**Author:** [@Richard\_Border](https://discourse.mc-stan.org/u/Richard_Border)\
**Replies:** 2\
**Last updated:** [April 13, 2022, 5:29pm UTC](https://discourse.mc-stan.org/t/recommendations-for-problem-specific-stan-esque-dynamic-hmc-implementation/27128 "2022-04-13T17:29:04Z")

</div>

Hello all. I have been using Stan with great success to prototype and test a particular model with small simulated datasets. I’m now at a point where I would like to apply this model to datasets far larger than Stan was …

---

## [Create \`stanfit\` object faster](https://discourse.mc-stan.org/t/create-stanfit-object-faster/26269)

<div class="topic-metadata">

**Author:** [@neringab](https://discourse.mc-stan.org/u/neringab)\
**Replies:** 5\
**Last updated:** [February 16, 2022, 10:31am UTC](https://discourse.mc-stan.org/t/create-stanfit-object-faster/26269 "2022-02-16T10:31:45Z")

</div>

Hello, I use function read\_stan\_csv when I want to create stanfit object from the saved CSV file which is created by RStan. However, saved csv file can reach several gigabytes in size for a large number of parameters. I…

---

## [Relation between decomposition of ELBO and Hamiltonian](https://discourse.mc-stan.org/t/relation-between-decomposition-of-elbo-and-hamiltonian/19303)

<div class="topic-metadata">

**Author:** [@hyunji.moon](https://discourse.mc-stan.org/u/hyunji.moon)\
**Replies:** 1\
**Last updated:** [November 16, 2020, 2:37pm UTC](https://discourse.mc-stan.org/t/relation-between-decomposition-of-elbo-and-hamiltonian/19303 "2020-11-16T14:37:34Z")

</div>

Is there any relation between the two decompositions? Evidence lower bound that decomposes into Energy term and Neg-Entropy term. -\\mathrm{ELBO}(\\boldsymbol{w})=\\underset{\\mathrm{z} \\sim q\_{w}}{\\mathbb{E}}\[-\\log p(\\m…

---

## [Implicit, full-rank Q (Householder QR)](https://discourse.mc-stan.org/t/implicit-full-rank-q-householder-qr/14651)

<div class="topic-metadata">

**Author:** [@deasmhumhna](https://discourse.mc-stan.org/u/deasmhumhna)\
**Replies:** 1\
**Last updated:** [May 4, 2020, 11:02am UTC](https://discourse.mc-stan.org/t/implicit-full-rank-q-householder-qr/14651 "2020-05-04T11:02:44Z")

</div>

I am interested in capturing both the column span and null space of a N\\times K dense matrix X for large N where the values of X depend on some scalar parameter(s) (for example, X contains the scaled-eigenfunctions of a …

---

## [Standalone generated quantities usage help : cmdstanr](https://discourse.mc-stan.org/t/standalone-generated-quantities-usage-help-cmdstanr/14548)

<div class="topic-metadata">

**Author:** [@sam\_learner](https://discourse.mc-stan.org/u/sam_learner)\
**Replies:** 3\
**Last updated:** [April 23, 2020, 3:37pm UTC](https://discourse.mc-stan.org/t/standalone-generated-quantities-usage-help-cmdstanr/14548 "2020-04-23T15:37:13Z")

</div>

Problem Description : I have a very large dataset and as having generated quantities makes sampling lot slower so I didn’t have this block in the Stan code to fit the model and get the samples. I currently have the samp…

---

## [Stan FAQ](https://discourse.mc-stan.org/t/stan-faq/1921)

<div class="topic-metadata">

**Author:** [@Bob\_Carpenter](https://discourse.mc-stan.org/u/Bob_Carpenter)\
**Replies:** 2\
**Last updated:** [September 19, 2017, 8:43pm UTC](https://discourse.mc-stan.org/t/stan-faq/1921 "2017-09-19T20:43:09Z")

</div>

This is really about the Stan language and algorithms. I created a Stan FAQ. I realized when I was done I hadn’t really followed the standard frequently asked questions form—it’s more frequent answers with some hints a…
