# Questions

**URL:** https://discourse.pymc.io/c/questions/6.md

[Latest](https://discourse.pymc.io/latest.md) · [Categories](https://discourse.pymc.io/categories.md) · [Tags](https://discourse.pymc.io/tags.md)

---

## [Frequently Asked Questions](https://discourse.pymc.io/t/frequently-asked-questions/74)

<div class="topic-metadata">

**Author:** [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Replies:** 12\
**Last updated:** [June 30, 2023, 12:30pm UTC](https://discourse.pymc.io/t/frequently-asked-questions/74 "2023-06-30T12:30:26Z")

</div>

Is find\_MAP still encouraged in practice? i notice a lot of code samples stopped using find\_MAP (asked by @kpei) find\_MAP is pretty much discouraged now in most situations. The MAP is not a representative point in high…

---

## [About the Questions category](https://discourse.pymc.io/t/about-the-questions-category/17)

<div class="topic-metadata">

**Author:** [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Replies:** 0\
**Last updated:** [May 31, 2017, 7:35am UTC](https://discourse.pymc.io/t/about-the-questions-category/17 "2017-05-31T07:35:53Z")

</div>

Improve your PyMC model, or migrated from other Bayesian Statistics package. If you have the following questions, look no further: My PyMC code is really slow, what should I do? I want to implement a specific dist…

---

## [BART Binary Regression Issues](https://discourse.pymc.io/t/bart-binary-regression-issues/17968)

<div class="topic-metadata">

**Author:** [@Pegguins](https://discourse.pymc.io/u/Pegguins)\
**Replies:** 3\
**Last updated:** [October 19, 2026, 8:21am UTC](https://discourse.pymc.io/t/bart-binary-regression-issues/17968 "2026-10-19T08:21:20Z")

</div>

Hi, I’ve been working on a classification problem recently. Its highly skew data (~8% of observations in the positive class) so used a cloglog link to fit a bambi model. Results were reasonable but not amazing so I thou…

---

## [Did state-space models change the way they handle time-varying matrices?](https://discourse.pymc.io/t/did-state-space-models-change-the-way-they-handle-time-varying-matrices/17950)

<div class="topic-metadata">

**Author:** [@JSR](https://discourse.pymc.io/u/JSR)\
**Replies:** 3\
**Last updated:** [September 30, 2026, 9:41pm UTC](https://discourse.pymc.io/t/did-state-space-models-change-the-way-they-handle-time-varying-matrices/17950 "2026-09-30T21:41:22Z")

</div>

I recently installed pymc on my windows computer using the pip installer. The following code works on my linux machine, which has an older version installed via conda. It doesn’t work on my windows laptop. import numpy …

---

## [Save and Load a BART model](https://discourse.pymc.io/t/save-and-load-a-bart-model/13135)

<div class="topic-metadata">

**Author:** [@JTIEGS](https://discourse.pymc.io/u/JTIEGS)\
**Replies:** 9\
**Last updated:** [September 28, 2026, 1:18pm UTC](https://discourse.pymc.io/t/save-and-load-a-bart-model/13135 "2026-09-28T13:18:54Z")

</div>

Hi, I am trying to save and load a trained model for posterior predictions with a model that contains a BART RV. I am running into multiple issues that is making this task seem not possible. If anyone could provide me wi…

---

## [Bambi, Count data and thresholds](https://discourse.pymc.io/t/bambi-count-data-and-thresholds/17926)

<div class="topic-metadata">

**Author:** [@Pegguins](https://discourse.pymc.io/u/Pegguins)\
**Replies:** 9\
**Last updated:** [September 24, 2026, 9:28am UTC](https://discourse.pymc.io/t/bambi-count-data-and-thresholds/17926 "2026-09-24T09:28:55Z")

</div>

Hi. I’ve been tinkering away with some Bambi model development. I’m looking at some attendence data. We’re interested in modelling the number of times people attend, but also whether people are over a specific threshold…

---

## [Indexing for vector variable](https://discourse.pymc.io/t/indexing-for-vector-variable/17937)

<div class="topic-metadata">

**Author:** [@JSR](https://discourse.pymc.io/u/JSR)\
**Replies:** 2\
**Last updated:** [September 16, 2026, 12:00pm UTC](https://discourse.pymc.io/t/indexing-for-vector-variable/17937 "2026-09-16T12:00:11Z")

</div>

What’s the syntax to index a vector-valued variable? The following code does what I want, but it’s rather clunky (and will only get more clunky the longer the vector). sample\_idx, sample\_dims = pd.factorize(df\['sample'\]…

---

## [DEMetropolis stalls with progressbar=True](https://discourse.pymc.io/t/demetropolis-stalls-with-progressbar-true/17925)

<div class="topic-metadata">

**Author:** [@excaliburrrrrrrrr](https://discourse.pymc.io/u/excaliburrrrrrrrr)\
**Replies:** 6\
**Last updated:** [September 9, 2026, 9:07am UTC](https://discourse.pymc.io/t/demetropolis-stalls-with-progressbar-true/17925 "2026-09-09T09:07:49Z")

</div>

Hi everyone, I rely on MCMC progress and estimated remaining time to schedule subsequent computations. With parallel DEMetropolis, enabling the progress bar appears to stall my job. Disabling it allows completion, but l…

---

## [Setting and justifying priors for a discrete "what went wrong" model when I have no labeled data](https://discourse.pymc.io/t/setting-and-justifying-priors-for-a-discrete-what-went-wrong-model-when-i-have-no-labeled-data/17917)

<div class="topic-metadata">

**Author:** [@ChiragG2101](https://discourse.pymc.io/u/ChiragG2101)\
**Replies:** 1\
**Last updated:** [September 3, 2026, 4:31pm UTC](https://discourse.pymc.io/t/setting-and-justifying-priors-for-a-discrete-what-went-wrong-model-when-i-have-no-labeled-data/17917 "2026-09-03T16:31:38Z")

</div>

I’m modeling a data-quality decision as a small discrete belief problem and would love a sanity check from people who do this properly (I’m a software engineer, newer to Bayesian methods). For each scraped product-spe…

---

## [Small-N Bayesian Poisson regression, sign flip on leave-one-out — sanity check on approach?](https://discourse.pymc.io/t/small-n-bayesian-poisson-regression-sign-flip-on-leave-one-out-sanity-check-on-approach/17921)

<div class="topic-metadata">

**Author:** [@Alex25](https://discourse.pymc.io/u/Alex25)\
**Replies:** 2\
**Last updated:** [August 30, 2026, 3:10pm UTC](https://discourse.pymc.io/t/small-n-bayesian-poisson-regression-sign-flip-on-leave-one-out-sanity-check-on-approach/17921 "2026-08-30T15:10:03Z")

</div>

Working on a small applied project: testing whether a technical “readiness” score for e-commerce vendors predicts how often an LLM agent mentions them in purchase-recommendation queries. Poisson regression, mentions ~ No…

---

## [Priors, begginer questions and Titanic Data](https://discourse.pymc.io/t/priors-begginer-questions-and-titanic-data/17892)

<div class="topic-metadata">

**Author:** [@Pegguins](https://discourse.pymc.io/u/Pegguins)\
**Replies:** 1\
**Last updated:** [July 31, 2026, 6:00pm UTC](https://discourse.pymc.io/t/priors-begginer-questions-and-titanic-data/17892 "2026-07-31T18:00:47Z")

</div>

Hello, Apologies for the likely common and oft repeated prior quandary. I’ve been reading through the excellent examples, questions here, and articles such as this one by the Stan team: Prior Choice Recommendations · st…

---

## [Arviz Issues following Tutorials](https://discourse.pymc.io/t/arviz-issues-following-tutorials/17874)

<div class="topic-metadata">

**Author:** [@Pegguins](https://discourse.pymc.io/u/Pegguins)\
**Replies:** 2\
**Last updated:** [July 21, 2026, 8:34am UTC](https://discourse.pymc.io/t/arviz-issues-following-tutorials/17874 "2026-07-21T08:34:07Z")

</div>

Hi. I’ve been trying to follow along the data containers tutorial: Using Data Containers — PyMC example gallery To try understand the data structures and model specification better. (I’m only used to using the R style …

---

## [Hierarchical model with copula on GPU: NumPyro or nutpie using PyMC 5.19?](https://discourse.pymc.io/t/hierarchical-model-with-copula-on-gpu-numpyro-or-nutpie-using-pymc-5-19/17853)

<div class="topic-metadata">

**Author:** [@user-jiyichen](https://discourse.pymc.io/u/user-jiyichen)\
**Replies:** 3\
**Last updated:** [July 9, 2026, 2:25pm UTC](https://discourse.pymc.io/t/hierarchical-model-with-copula-on-gpu-numpyro-or-nutpie-using-pymc-5-19/17853 "2026-07-09T14:25:45Z")

</div>

My compute cluster only supports PyMC 5.19 using Python 3.12.4, and I need to fit a bivariate joint model with copulas and two quite complicated marginal models (~2k parameters). It took ~5 hours for 5k warmups + 5k ite…

---

## [Sampling troubleshooting. Help find a cause](https://discourse.pymc.io/t/sampling-troubleshooting-help-find-a-cause/17730)

<div class="topic-metadata">

**Author:** [@quantarochen](https://discourse.pymc.io/u/quantarochen)\
**Replies:** 14\
**Last updated:** [June 25, 2026, 9:38pm UTC](https://discourse.pymc.io/t/sampling-troubleshooting-help-find-a-cause/17730 "2026-06-25T21:38:43Z")

</div>

Hello everyone, I am new to pymc. I am stuck with a problem with my model and need help. Context of data: protein intensities’ dataframe of shape (proteins x experimental trials). The goal is to model posterior distrib…

---

## [Help to speed up sampling -- too long to be clinically practical](https://discourse.pymc.io/t/help-to-speed-up-sampling-too-long-to-be-clinically-practical/17852)

<div class="topic-metadata">

**Author:** [@hd2005](https://discourse.pymc.io/u/hd2005)\
**Replies:** 16\
**Last updated:** [June 25, 2026, 5:42am UTC](https://discourse.pymc.io/t/help-to-speed-up-sampling-too-long-to-be-clinically-practical/17852 "2026-06-25T05:42:52Z")

</div>

Hi all, I am using pymc to perform a 3-parameter mono-exponential decay fitting (y = A exp(-t/T2)+B); However, it takes 4 seconds to complete one fitting task. For comparison, it only takes scipy.curve\_fit 1.5ms to comp…

---

## [Guide to Bayesian Viz?](https://discourse.pymc.io/t/guide-to-bayesian-viz/15909)

<div class="topic-metadata">

**Author:** [@rsenne](https://discourse.pymc.io/u/rsenne)\
**Replies:** 6\
**Last updated:** [June 24, 2026, 8:45pm UTC](https://discourse.pymc.io/t/guide-to-bayesian-viz/15909 "2026-06-24T20:45:57Z")

</div>

I was curious if anyone has good resources for Bayesian visualization? I’m doing some modelling for an academic paper and am using Hierarchical GLMs. I’m relatively new to using primarily Bayesian methods, but I’m turnin…

---

## [DE-Metropolis-Z algorithm](https://discourse.pymc.io/t/de-metropolis-z-algorithm/5506)

<div class="topic-metadata">

**Author:** [@berakrishn](https://discourse.pymc.io/u/berakrishn)\
**Replies:** 3\
**Last updated:** [June 16, 2026, 1:15pm UTC](https://discourse.pymc.io/t/de-metropolis-z-algorithm/5506 "2026-06-16T13:15:19Z")

</div>

I am trying to look for the reference paper (if there is any) which talks about DE-Metropolis-Z algorithm. I want to understand how DE-Metropolis is different from DE-Metropolis-Z - both, in theory and in implementation…

---

## [Gradientless sampler on the GPU through PyMc?](https://discourse.pymc.io/t/gradientless-sampler-on-the-gpu-through-pymc/17847)

<div class="topic-metadata">

**Author:** [@Bandit](https://discourse.pymc.io/u/Bandit)\
**Replies:** 1\
**Last updated:** [June 16, 2026, 2:13am UTC](https://discourse.pymc.io/t/gradientless-sampler-on-the-gpu-through-pymc/17847 "2026-06-16T02:13:46Z")

</div>

Is there any way to use a gradientless sampler (e.g. Slice, ESS, or Randomwalk) on the GPU through PyMC? As best as I can tell, the least-friction option is to build the model using PyMC, extract it, and then run numpyro…

---

## [Comparing evidence (Bayes Factors) for two competing posterior models as a (kind of) hypothesis test](https://discourse.pymc.io/t/comparing-evidence-bayes-factors-for-two-competing-posterior-models-as-a-kind-of-hypothesis-test/17819)

<div class="topic-metadata">

**Author:** [@cmcnorgan](https://discourse.pymc.io/u/cmcnorgan)\
**Replies:** 3\
**Last updated:** [June 15, 2026, 7:22pm UTC](https://discourse.pymc.io/t/comparing-evidence-bayes-factors-for-two-competing-posterior-models-as-a-kind-of-hypothesis-test/17819 "2026-06-15T19:22:52Z")

</div>

I’m looking at mean differences between salary two groups (Male vs. Female) in a synthetic dataset. Gender was determined randomly, so the ground truth is that there is no gender difference. At the end of the day, I’m l…

---

## [How can I implement hierarchies for my Gamma BART model?](https://discourse.pymc.io/t/how-can-i-implement-hierarchies-for-my-gamma-bart-model/17823)

<div class="topic-metadata">

**Author:** [@amackay](https://discourse.pymc.io/u/amackay)\
**Replies:** 3\
**Last updated:** [June 11, 2026, 9:32pm UTC](https://discourse.pymc.io/t/how-can-i-implement-hierarchies-for-my-gamma-bart-model/17823 "2026-06-11T21:32:05Z")

</div>

Hi all, I’m new to BART so please go easy on me! My data has two crossed categorical variables ‘Class’ and ‘Brand’. At present I’ve encoded them both as the mean of the target variable by categories (One for each class,…

---

## [Saving inference data to netcdf when using nutpie](https://discourse.pymc.io/t/saving-inference-data-to-netcdf-when-using-nutpie/17718)

<div class="topic-metadata">

**Author:** [@Hyperthetical](https://discourse.pymc.io/u/Hyperthetical)\
**Replies:** 6\
**Last updated:** [June 11, 2026, 1:54am UTC](https://discourse.pymc.io/t/saving-inference-data-to-netcdf-when-using-nutpie/17718 "2026-06-11T01:54:09Z")

</div>

I have a model that works fine and saves to a netcdf file fine when using the default nuts sampler. However, when using nutpie I cannot save a netcdf file. What I get is TypeError stemming from the sample\_stats attribute…

---

## [Dimension error while replicating the Lotka Volterra model example](https://discourse.pymc.io/t/dimension-error-while-replicating-the-lotka-volterra-model-example/16224)

<div class="topic-metadata">

**Author:** [@maerad](https://discourse.pymc.io/u/maerad)\
**Replies:** 4\
**Last updated:** [April 29, 2026, 12:58am UTC](https://discourse.pymc.io/t/dimension-error-while-replicating-the-lotka-volterra-model-example/16224 "2026-04-29T00:58:24Z")

</div>

I’m trying to replicate the Lotka Volterra example in the Approximate Bayesian Computation section, and find that I’m getting an dimension mismatch error. Specifically, while running the sample() method, I get RuntimeE…

---

## [Out of sample predictions with missing data](https://discourse.pymc.io/t/out-of-sample-predictions-with-missing-data/17698)

<div class="topic-metadata">

**Author:** [@tnd](https://discourse.pymc.io/u/tnd)\
**Replies:** 2\
**Last updated:** [April 28, 2026, 3:32pm UTC](https://discourse.pymc.io/t/out-of-sample-predictions-with-missing-data/17698 "2026-04-28T15:32:41Z")

</div>

Dear friends, I am looking for a way to do missing value imputation for out of sample data predictions. I am checking the tutorial GLM-missing-values-in-covariates, and I have a question about Section 2.5. When we do p…

---

## [Issues with PyMC Marekting on Databricks](https://discourse.pymc.io/t/issues-with-pymc-marekting-on-databricks/17677)

<div class="topic-metadata">

**Author:** [@Dominika](https://discourse.pymc.io/u/Dominika)\
**Replies:** 2\
**Last updated:** [April 23, 2026, 6:50am UTC](https://discourse.pymc.io/t/issues-with-pymc-marekting-on-databricks/17677 "2026-04-23T06:50:44Z")

</div>

Hello, I’m runing an issue when installing pymc-marketing on a Databricks cluster. After installing the library (via Compute → Libraries), the Python REPL fails to start with the error: “Failure starting repl. Try det…

---

## [How do you do interventions on a statespace model?](https://discourse.pymc.io/t/how-do-you-do-interventions-on-a-statespace-model/17693)

<div class="topic-metadata">

**Author:** [@JSR](https://discourse.pymc.io/u/JSR)\
**Replies:** 2\
**Last updated:** [April 18, 2026, 6:48pm UTC](https://discourse.pymc.io/t/how-do-you-do-interventions-on-a-statespace-model/17693 "2026-04-18T18:48:58Z")

</div>

I’ve calibrated a statespace model and want to see how its behaviour changes when I modify some of the model parameters. I thought I might be able to use the do function, but if that’s possible I haven’t been able to fig…

---

## [Numba TypingError in custom statespace AR(3) model](https://discourse.pymc.io/t/numba-typingerror-in-custom-statespace-ar-3-model/17694)

<div class="topic-metadata">

**Author:** [@hridaii](https://discourse.pymc.io/u/hridaii)\
**Replies:** 0\
**Last updated:** [April 18, 2026, 5:30pm UTC](https://discourse.pymc.io/t/numba-typingerror-in-custom-statespace-ar-3-model/17694 "2026-04-18T17:30:01Z")

</div>

Hi Everyone. I have been working through Making a custom StateSpace Model.ipynb present in pymc-extras/notebook and ran into TypingError: No implementation of function elemwise(float64, float64, array(float64, 0d, C)) a…

---

## [Timeseries binary-decision problem](https://discourse.pymc.io/t/timeseries-binary-decision-problem/17441)

<div class="topic-metadata">

**Author:** [@Tester](https://discourse.pymc.io/u/Tester)\
**Replies:** 9\
**Last updated:** [April 9, 2026, 7:19pm UTC](https://discourse.pymc.io/t/timeseries-binary-decision-problem/17441 "2026-04-09T19:19:30Z")

</div>

I have data from an experiment in which subjects repeatedly completed a specific task that required a forced binary decision (option A vs. B). I only observe this decision at the end of each recording. As predictors/IVs,…

---

## [Question on Nested Logit for Retail Expansion](https://discourse.pymc.io/t/question-on-nested-logit-for-retail-expansion/17626)

<div class="topic-metadata">

**Author:** [@skalilopa](https://discourse.pymc.io/u/skalilopa)\
**Replies:** 2\
**Last updated:** [April 8, 2026, 9:38am UTC](https://discourse.pymc.io/t/question-on-nested-logit-for-retail-expansion/17626 "2026-04-08T09:38:15Z")

</div>

Hello, I am working on a store expansion strategy: identifying optimal locations for new store openings. My approach: • I divide the trade areAa into grid cells, each representing a population segment acting as a “con…

---

## [Can't get predictions from Bambi. Encountering \`ValueError: different number of dimensions on data and dims: 0 vs 2\`](https://discourse.pymc.io/t/cant-get-predictions-from-bambi-encountering-valueerror-different-number-of-dimensions-on-data-and-dims-0-vs-2/17684)

<div class="topic-metadata">

**Author:** [@nickeubank](https://discourse.pymc.io/u/nickeubank)\
**Replies:** 5\
**Last updated:** [April 3, 2026, 2:13am UTC](https://discourse.pymc.io/t/cant-get-predictions-from-bambi-encountering-valueerror-different-number-of-dimensions-on-data-and-dims-0-vs-2/17684 "2026-04-03T02:13:20Z")

</div>

(apologies this is a bit of a cross post — I posted as a bambi github issue first before it occurred to me that pymc may have a more populated forum that might also be a better place since I’m not sure if this is user er…

---

## [Exploring Streaming / Minibatch Inference in PyMC](https://discourse.pymc.io/t/exploring-streaming-minibatch-inference-in-pymc/17646)

<div class="topic-metadata">

**Author:** [@jhanani](https://discourse.pymc.io/u/jhanani)\
**Replies:** 4\
**Last updated:** [March 26, 2026, 5:37pm UTC](https://discourse.pymc.io/t/exploring-streaming-minibatch-inference-in-pymc/17646 "2026-03-26T17:37:52Z")

</div>

Hello! I am Jhanani. I’ve been recently following the Streaming/Online Inference for GSOC 2026. Recently, I have been working with PyMC and implemented a small prototype to understand streaming and minibatch-style infer…

[Next page](https://discourse.pymc.io/c/questions/6.md?page=1)
