Skip to content

Hurdle Gamma likelihood not working #951

@zwelitunyiswa

Description

@zwelitunyiswa

The Hurdle Gamma likelihood does not work with with even the native sampler. I have been using an earlier of version of BAMBI and PYMC for a while, when the Hurdle Gamma likelihood worked (bambi ==0.15.0 || pymc==5.23.0 || pytensor==2.31.4).

I am currently using:

bambi == 0.16.0
pymc==5.27.0
pytensor ==2.36.1

Here is example code:

import bambi as bmb
import polars as pl
import pymc as pm

# create simple dataframe with HG likelihood

dist = pm.HurdleGamma.dist(psi=0.3, mu=4, sigma=0.5)
draws = pm.draw(vars=dist, draws=100, random_seed=1)
df = pl.DataFrame({"area": draws}).to_pandas()

# create bambi model
model = bmb.Model(formula="area ~ 1", data=df, family="hurdle_gamma")

# sample
idata = model.fit()

idata

I get:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions