@tcapretto Do weights works with a bernoulli likelihood? I am getting errors regardless of it I code the column as a string or Boolean. Not sure what I am doing wrong.
I thought I had a solution using binomial instead, but was wrong.. interested as well in how this is supposed to work in that case… weighted(p(n,N), weights) ~ 1
? Or some other syntax?
I tried that and got the same error
My apologies, I did not mean to imply that this was (currently?) legal syntax.
To sample this model it might be necessary to go down to the Pymc level at the moment.
No problem, mate.
The way to do it would be
model = bmb.Model("weighted(healed_binary, weights) ~ 1 + treatment", data = df_weighted, family="bernoulli")
where healed_binary
is 0 or 1.
However, there’s a bug right now that causes in a ValueError
being raised incorrectly.
The error I have found is here:
First, we don’t need to check all the values in the design matrix, only the first column that corresponds to the 0-1s. Second, the way the check is done is also causing an error. It should be (...).all()
instead of all(...)
.
Sorry I can’t give you a way to resolve this right now.