Questions tagged [bambi]

bambi (BAyesian Model Building Interface) is a Python package that provides a simple, high-level interface for fitting Generalized Linear Mixed Models (GLMMs) in a fully Bayesian setting using either Stan or PyMC3 backends.

7 questions
3
votes
1 answer

Interpretation of variables in multi-level regression with random effects

I have a dataset that looks like the one below (first 5 rows shown). CPA is an observed result from an experiment (treatment) on different advertising flights. Flights are hierarchically grouped in campaigns. campaign_uid flight_uid treatment …
2
votes
1 answer

Incorrect results with Poisson regression using bambi?

I am giving bambi (version 0.1.0) a try for a simple Poisson regression model. However the results differ when compared to straight pymc3 or statsmodels implementations, and I cannot seem to figure out how to interpret the coefficients that bambi…
user3083667
  • 105
  • 1
  • 7
1
vote
0 answers

How to pass a coordinate to inference data

I've been skimming through Arviz documentation and came across 8 school inference data. import arviz as az idata = az.load_arviz_data("centered_eight") Inference data object also includes school coordinate. How can I do that with my bambi models? I…
mihagazvoda
  • 1,057
  • 13
  • 23
1
vote
1 answer

How to analzye this output of Bayesian analysis

I am trying to do Bayesian analysis using pymc3 and bambi softwares. My data shape is 136x5 and top 5 rows are as follows: AGE GENDER AVAR BVAR OUTVAR 0 60 F 0.9 0 8260.0 1 56 F 5.4 1 15888.0 2 55 F 1.2 …
rnso
  • 23,686
  • 25
  • 112
  • 234
0
votes
0 answers

Fit a (frequentist) maximum likelihood model in Bambi

Let's say I have a simple binomial regression model: import pandas as pd import bambi as bmb df = pd.DataFrame(data={'group': ['A', 'B'], 'y': [3, 4], 'n': 10}) model = bmb.Model("p(y, n) ~ group", df, family="binomial") idata = model.fit() Is…
mihagazvoda
  • 1,057
  • 13
  • 23
0
votes
1 answer

In Arviz while ploting the plot_trace or plot_posterior getting the type error

While running the code az.plot_trace(result_final); facing the below error TypeError: expected dtype object, got 'numpy.dtype[float64]' The above exception was the direct cause of the following exception: SystemError: CPUDispatcher(
0
votes
2 answers

Specify log-normal family in BAMBI model

I'm trying to fit a simple Bayesian regression model to some right-skewed data. Thought I'd try setting family to a log-normal distribution. I'm using pymc3 wrapper BAMBI. Is there a way to build a custom family with a log-normal distribution?
user3768727
  • 71
  • 1
  • 5