Open wds15 opened 1 year ago
Thank you. Let's think about some good ("natural") behavior of index
models for new data. Once we have that, I think all of the current problems will be resolved.
I updated the reprex above to show what I would expect to happen (note that there are small changes to the data-sets at the top of the script). This is what would mimic the logic as it happens during the fitting process... but I guess that there could be other choices as well such that considering an option for what is happening (now or at a later stage) is likely sensible. Does it make sense to you what I wrote in more or less dummy coding (though it works).
BTW, I think I have found a workaround for getting what I want, which is imputation with uncertainty: One can simply include the data for which one wants predictions in the data set being fitted, but declare the outcome to be NA (and allow missing in the main outcome of the model). Doing so then allows me to do a posterior_predict
for these entries, since the sampler does the by-draw imputation and these are then being used by brms
to do the prediction...right? This solution makes fitting slower and does not really scale, but it does work in small problems at least.
Yes, but then you have to feed back a lot of data sets (one per draw) into posterior_predict, right? Which creates a lot of computational overhead. I agree that this is currently the most viable (but still suboptimal solution) if I understand correctly what you mean.
It's brute force, yes. It does work ok for the small data sets I am working on right now ok...but for anything bigger it's a pain, yes! It's cumbersome as you need to code up the data-sets with great care in terms of not only what you want to fit, but also what you want to predict (and, yes, the posterior_predict
always has to go over the entire data-set).
The
index
feature appears to have some issues with its interactions withemmeans
. Here is an example:Update of reprex below on 2023-05-17:
Created on 2023-05-17 with reprex v2.0.2