I am doing some missing data imputation in my response Y and a predictor as well but my data is organised in a hierarchical manner. Where each Y observation is nested within a temperature, for each individual for a given sampling session.
I followed the vignette on data imputation.
I wanted to know if imputation during fitting retains the model structure that I specify? And if I used MICE and did multiple imputation would that ‘break’ the hierarchical structure of my data?
My model looks like this:
imp.3.1 <- bf(lnmr | mi() ~ temp + mi(lnmass) + z_age + (1 + temp | id) + (1 | samp_session) + (1 | series_temp))
imp.3.2 <- bf(lnmass | mi() ~ 1)
cold.mod.imp.3 <- brm(imp.3.1 + imp.3.2,
data = mi_cold_data,
family = gaussian(),
chains = 4, cores = 1, iter = 4000, warmup = 1500, thin = 5,
control = list(adapt_delta = 0.98))
All your advice, particularly from @paul.buerkner would be greatly appreciated.