Test/validation set and multilevel models

Hi everyone,

I’ve implemented a multilevel model (with random effects for individuals), following the Hierarchical linear regression tutorial (Bayesian Hierarchical Linear Regression — NumPyro documentation). Since I want to potentially use such multilevel models for personalized medicine, I would like to use the model to predict a test set that contains baseline data of new, unseen, individuals.

Now I can of course use the fixed effects part of the model to make a prediction for this individual. That may be reasonable.

But I was wondering if I can do better than that, to generate a deviation from the fixed effects for this new individual somehow. I guess this could be done by creating clusters of individuals based on baseline characteristics and using these to get random effects instead.

But perhaps I could also first collect another data point of this individual (so I would have their baseline data and only one additional data point but not the remainder of the trajectory) and then use that to compute a weighted deviation somehow.

Any ideas? I’m relatively new to these types of models so perhaps (likely) there’s already a straightforward solution out there.