-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying priors for categorical variables in regression does not work #387
Comments
Hi @eort, What version of Without actually running the code, it seems that the error is with setting initial values. Does the error still happen when Thanks! |
Hi @digicosmos86,
The one in hssm/datasets. The problem originally occurred with my own data, so I tried to reproduce with the standard dataset so you can have a look yourself.
No, it doesn't! After I left out initvals from the model specifications, the model compiles fine |
Hi @eort, It seems that after removing the parenthesis around @tomicapretto Could you share some insights? Thanks! |
Hi @digicosmos86, Thanks for looking into this!
I'm not 100% sure, but when I try this (parentheses on/off), I get different models. No parentheses won't include random effects in the model. When I look into the inference data, there are no See here with parentheses (output shortened):
And here without:
|
Hi @eort, Thanks for catching that! I think for now the best way to specify the formulas is Thanks for bring this to our attention! |
Sounds good. But to be clear, like you said in your first post, one should also not specify the |
It is unclear to me right now how |
@eort @digicosmos86 sorry for the delay. I think the problem is related to Bambi not handling correctly the shapes of the parameters of the prior and the Update I have to run now, but regarding the parenthesis discussion, you have to include the parenthesis for group-specific terms. |
Thank you @tomicapretto for looking into this! |
Perhaps this is due to the way that I specify these
For the cavanagh dataset that should be something like:
where |
Describe the bug
When running a (hierarchical) regression model and I try to specify priors for categorical variables I receive following error:
TypeError: Wrong number of dimensions: expected 1, got 0 with shape ().
(full stack trace below). I only tried this for theangle
modelHSSM version
0.2
To Reproduce
Full stack trace:
Traceback (most recent call last):
The text was updated successfully, but these errors were encountered: