I am trying to understand how we can estimate the effect of a covariate on population mean response when we have fitted a generalised linear mixed model with non-linear link function to the data. I refer to section 13.3 of Fitzmaurice et al. (2011) for our discussion.
For example, consider the logistic regression model with a randomly varying intercept, $$logit\{E( Y_i|b_i )\} = X_i\beta^* + b_i,$$ where $b_i \sim {N(0, \sigma_b ^2)}$.
Let $e^{X_i\beta^* \ + \ b_i} = c$.
The implied model for marginal mean or marginal probability of success is
$$ E(Y_i) = \int_{-\infty}^{\infty}{\frac{c}{(1 + c)\sqrt{2\pi\sigma_b^2}}}e^{\frac{-b_i^2}{2\sigma^2_b}}db_i $$
In the above integral, the notion of $b_i$ being a random variable is clear.
[the above] expression cannot be evaluated in closed-form. $\dots$From a purely probabilistic point of view, generalized linear mixed models might appear to have a distinct advantage over marginal models since the marginal distribution of $Y_i$, the target of inference for marginal models, can, in principle, be derived from the generalized linear mixed effects model by averaging over the distribution of the random effects.
Because the authors did not explicitly mention how to perform such averaging, I referred to the section 16.3 of Molenberghs and Verbeke (2005) for more information:
Again, numerical integration methods can be used, but it is often much easier to use numerical averaging by sampling a large number $M$ of random-effects vectors $b_i$ from their fitted distribution $N(0, \hat{D})$, and to estimate ${E}[Y_i]$ by
$$ \hat{E}(Y_i) = \frac{1}{M} \sum_{1}^{M}{\frac{exp(X_i\hat{\beta^*} + b_i)}{1 + exp(X_i\hat{\beta^*} + b_i)}} $$
It seems to me that this estimation procedure does not hold on the notion that $b_i$ is a random variable because it assigns equal weights ($\frac{1}{M}$) to all the sampled values of $b_i$. Won't the following expression be more helpful?
$$ \hat{E}(Y_i) = \sum_{1}^{M}{\frac{exp(X_i\hat{\beta^*} + b_i)}{1 + exp(X_i\hat{\beta^*} + b_i)}\cdot P(b_i)} $$
Whether or not the above expression is helpful, would the calculation suggested by Molenberghs and Verbeke be similar to the estimated marginal means computed by emmeans for a GLMM?
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis. John Wiley & Sons.
Models for Discrete Longitudinal Data. (2005). In Springer Series in Statistics. Springer-Verlag. https://doi.org/10.1007/0-387-28980-1