Using Bambi to extract Random coefficients

Hi All,

I’ve a basic question about extracting random coefficients from a Bambi based mixed-effects model. I have patient level data, for ~ 1,200 patients each with 104 weeks of data. Aim is to estimate the impact of specific intervention on their QOL. I would like to extract the random coefficients for each patient as there is strong evidence to believe there is significant variation among individual patients on their response to interventions.

Any code examples or links to the same would be great!

Sree

Hey @sree_datta ,

So this doesn’t get lost, could you make your question a bit more precise perhaps?

If you already have a bambi model idea, it shouldn’t be too hard to extract the random effects that were estimated. For example, you can take a look at this bambi example, where in “Estimated regression line”, they pull out the parameters for a specific unit.

If it’s more about how to actually model your situation, the question of how an intervention impacts quality of life, then I’d have to think about that a bit. Let us know!

All the best,
Martin

Hey @Martin_Ingram did you mean to link to something here?

Ah yes apologies, I meant to link this one: Bambi – multi-level_regression

It pulls out the parameters for one of the pigs.

1 Like