I'm trying to merge zeroinfl poisson with a lmer model, how can I do that?
cro<-zeroinfl(carbapenem~time COVID-19 time*COVID-19 month (time|ORGANISM),data=all_mall)
Error in X1 | ORGANISM :
operations are possible only for numeric, logical or complex types
CodePudding user response:
Probably the easiest way would be to use a Bayesian approach with the brms
package. For example,
brm(carbapenem~time `COVID-19` time*`COVID-19` month (time|ORGANISM),
data = all_mall, family = zero_inflated_poisson())
Note that to treat COVID-19 as a variable, you should enclose it in back-ticks.