Skip to main content

Questions tagged [pymc]

PyMC is a Python library for performing Bayesian inference using MCMC. It is a Python equivalent to JAGS and BUGS.

6 votes
2 answers
178 views

I am trying to estimate the values of three unknown parameters in the Ordinary Differential Equation (ODE) using pyMC. Physically, A should be smaller than both B and C. But, given the data and ODE I ...
Auberron's user avatar
  • 183
1 vote
1 answer
85 views

I am trying to follow an example notebook from here but I am running into some IndexErrors when executing the code. Here's a Minimal working example: ...
Jesús Ros's user avatar
3 votes
2 answers
180 views

Suppose my model looks like $y=\beta_1x_1 + \beta_2x_2 + \beta_3x_3$, but there's a catch: I want to enforce $\beta_1=\beta_3$. How do I do this, in both frequentist and Bayesian setup? Specifically ...
Baron Yugovich's user avatar
0 votes
0 answers
47 views

I am starting with probabilistic programming and PyMC and seems that stuck with the first step. I am trying to figure out something very simple and then add complexity. Appreciate if you can help me ...
irriss's user avatar
  • 121
0 votes
0 answers
99 views

I am trying to create a GLM to model some count data. I am using the pymc package in python. The set up is what I believe to be the usual set up: $$Y \sim NB(\mu,k) $$ $$E(Y\vert\mathbf{X}) = \mu $$ $$...
TNoms's user avatar
  • 95
3 votes
1 answer
104 views

I have a sample from some population of 0s and 1s and need to estimate the posterior of the proportion of 1s in this population. But the catch is: for each observation in the sample I only have ...
nikoliazekter's user avatar
2 votes
1 answer
625 views

In a Bayesian MMM model using pymc3 the variables are scaled. It is said that scaling helps in improving the efficiency of the MCMC algorithm. Also, it is stated that setting priors for the non-scaled ...
T_S's user avatar
  • 21
2 votes
0 answers
38 views

I ran 4 chains with NUTS and made a forest plot, but I cannot show the plot here. In words, what I am seeing is the there is a lot of variability in the effective sample size (ESS) in the chains. ...
Galen's user avatar
  • 10.1k
2 votes
0 answers
264 views

I'm interested in performing a Bayesian meta-analysis, specifically, using a random-effects hierarchical model (as described here). Briefly, in this model we assume that the $k$th study's reported (...
hyoda's user avatar
  • 43
1 vote
0 answers
147 views

Inspired by Richard McElreath's "Full Luxury Bayes" in his Statistical Rethinking course, I wanted to implement a "Full Luxury Bayesian Marginal Structural Model". Briefly: MSMs ...
ehudk's user avatar
  • 161
6 votes
1 answer
771 views

I am learning how to use PyMC for Bayesian inference. I coded up a random intercept $Y = \gamma + \sum_{j=1}^3 \beta_j \mathbb{I}_j + \epsilon$ and looked at the trace plots. Here is a ...
Galen's user avatar
  • 10.1k
3 votes
1 answer
861 views

This question is based on question 1 of the week 2 Statistical Rethinking problems, i.e. q1 here: https://github.com/rmcelreath/stat_rethinking_2022/blob/main/homework/week02.pdf I have a pandas data ...
Azamat Bagatov's user avatar
4 votes
2 answers
742 views

In the spline regression tutorials of pymc and bambi they first define the knots using quantiles, but for building the design matrix they don't use the boundary knots and only keep the internal knots. ...
CuriousKernel's user avatar
2 votes
1 answer
230 views

Something is not performing as expected with PyMC. I'm trying a simple Beta-Binomial conjugate prior model, trying to recover known parameters. Control data ...
jbuddy_13's user avatar
  • 3,970
0 votes
0 answers
95 views

I'm working through Chapter 2 of BMCP and am having trouble understanding why the plot of a Bayesian p-value looks so unexpectedly "spiky" or multimodal. Here's my code ...
Jerry's user avatar
  • 176

15 30 50 per page
1
2 3 4 5
18