1

I have developed a GLMM (Mixed Generalized Linear Model), as you can see in more detail [here] (Is it correct to evaluate differences of a binary variable between different places with a GLMM?)

 glmer(data$binary ~ data$wetland + data$predictive2 + data$predictive3 + (1|data$date), data = data, family = binomial())

, and it turns out that I want to show in a plot, the probability of success of three levels of a predictive variable (wetland). I have 4 predictive variables, all of them were significant in the model, however, I only want to plot one, for my research objective.

Considering that the model is based on several predictive variables and not just one, in addition to a random effect variable (date), is it correct to make a plot? If the answer is yes, which one do you recommend?

Thanks for your time.

Dimitris Rizopoulos
  • 17,519
  • 2
  • 16
  • 37

1 Answers1

2

From a mixed-effects logistic regression, you can show/calculate two types of probabilities. Namely, conditional on the random effects or marginal populations. For more information on the difference between the two, check this post. Most often you want the latter.

Regarding getting this in R, you can have a look at the effects package, and the GLMMadaptive package for both fitting the model and getting the plots. An example here.

Dimitris Rizopoulos
  • 17,519
  • 2
  • 16
  • 37