-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Setting alias to random intercept of the parent parameter unexpectedly changes the name of the factor dimension #827
Comments
I see what you mean. I'm not sure the solution would be easy because there's some inconsistency here (probably with what we've done in Bambi) The terms for random effects are made of two parts: the formula, and the grouping variable. The first goes on the LHS of In that case, the random effects term results in a single new dimension added to the model (a dimension with as many levels as participants). But there can be cases where the formula on the LHS contains a categorical variable, and thus requires one new dimension. We decided to separate the dimensions into For example, if we have The problem with the aliases, is that we don't rename the LHS or the RHS independently. We rename the entire term. And since Bambi "loses" that information, the "safe" approach it takes is to just create a new dimension as if they were different things. I'm not sure what is the best solution here. One solution would be to rename the LHS and RHS of |
Thank you for looking into this, @tomicapretto! I wonder if there's some native naming solution in Bambi so that we don't need to use aliasing at all? I am seeing a bit of an inconsistencies here: the covariates on the regression of the parent are directly named, and the parameters on the regression on auxiliary parameters are named like f"{parameter}_{covariate}". If there is a way to get the latter naming convention with the parent parameter in bambi, aliasing would not be necessary. I think bambi is already moving towards the direction of not treating the parent radically differently in distributional models, so I wonder if we can go a bit further? |
I can imagine two scenarios where this can happen
I have a preference for |
I also have a strong preference for 1. It would be really helpful for us if this is possible in Bambi |
Thank you so much, the Bambi team, for the latest version! The graphs look much cleaner now. There is one small inconsistency, though. For example: I have a model built in Bambi with the following graph (
v
is the parent parameter here):I use model.set_alias({
"v": {
"1|participant_id": "v_1|participant_id"
}
})
After rebuilding the model, the graph looks like this:
Note the new plate
v_1|participant_id__factor_dim
. It seems that this should not be changed with aliasing like this. The corresponding dimension in the InferenceData that bambi creates also changes, creating a bit of an inconsistency hereThe text was updated successfully, but these errors were encountered: