Imputing New Poisson Response Variables in Model (brms)

I’m wondering if there is some other way to impute missing values within a brms call besides mice, since apparently the mice package does not support poisson-distributed variables. My response variable (NumARTR) is missing some values that I would like to impute. Here is my model form:

ARTRform <-bf(NumARTR|mi() ~ s(YrsSinceFire) + offset(log(PlotSizeM2))
+ ElevScale + SandScale + ClayScale +
(1|Site), family = poisson())
model1artrimp <-brm(ARTRform, data = denscover,
inits = “random”, prior = partr,
chains = 8, iter = 5000, future = TRUE,
warmup = 500, seed = 342, autocor = cor_arr(~ YearID|Plot),
control=list(max_treedepth = 13, adapt_delta=0.96))

  • Operating System: Linux
  • brms Version: 2.7.0

I get the following error: Error: Argument ‘mi’ is not supported for family ‘poisson(log)’.

I know I could impute the data prior to running the model but if there is anyway to impute it within the model run, this would be my preference.

Imputing poisson responses would require Stan to support discrete parameters, which currently it doesn’t. If, at some point in the future, this is implemented in Stan, brms will be able to support it as well.

1 Like

Does rstan or brms now allow imputing the responses of a poisson regression> thanks

No, this is a fundamental limitation of HMC sampling, and will likely not be resolved any time soon

1 Like

I see @andrjohns andrjohns thank you so much. What would you recommend as alternatives, I really liked rstan, I am trying to learn how to solve poison regression with missing data in both x the input, and y. Is rjags or openbugs my only solution? Thank you!!!


In this instance, your best bet is probably going to be replacing the missing categorical values prior to fitting the model. There are some examples in this brms vignette: Handle Missing Values with brms • brms

1 Like

Thank you so much I will take a look at that! Thanks!!