DHARMa icon indicating copy to clipboard operation
DHARMa copied to clipboard

Support for Generalized Estimating Equations (GEE) in DHARMa

Open quantstatmodel opened this issue 2 years ago • 3 comments

Hi,

Many thanks for building such an awesome library. However I dont see any example if this can be used with GEE model (package : glmtoolbox) particularly for Panel data. Is there any? If not, is there any plan to integrate glmtoolbox (or any other GEE package)

quantstatmodel avatar Jun 29 '22 08:06 quantstatmodel

I haven't worked with GEEs much, so if someone has more insights, comments would be appreciated, but based on my current understanding, I believe that this will be difficult both on a practical and a theoretical level.

  • On a practical level, glmtoolbox does not provide the functions that would be needed to simulate from a fitted GEE, so I would usually not include it in DHARMa.

  • On a theoretical level, the question is how you should simulate from a fitted GEE. My understanding is that GEE is not a separate model, but rather a robust estimator, so the underlying model will be, e.g., a GLM, and then you can estimate it with the GEE estimator instead of ML. The problem is: the very reason why you use the GEE is that you suspect certain problems (e.g. non-independence of data). When I simulate according to the data-generating model (which would be the GLM), these problems would show up in the same way as if we were to fit a GLM, but it's unclear of the GEE removes them (because there is no explicit data-generating process associated to the GEE).

If the second point about theory is correct, I would say that you could in principle take a fitted GEE, use the parameters in a GLM, simulate from the GLM and check it with DHARMa. However, you must be very clear which possible residual misfit you would expect the GEE to handle, and which you want to treat as a problem.

florianhartig avatar Jul 01 '22 08:07 florianhartig

Is it already interpretable to look at a GEE model residuals versus fitted plot?

DexterGlass avatar Aug 24 '22 11:08 DexterGlass

Hello Dexter, as I said above, it's not even clear to me what the right scaling would be, i.e. what residuals distributions you would expect for a "correct" GEE. If anyone has more insights on this, I could implement it in DHARMa.

florianhartig avatar Aug 24 '22 13:08 florianhartig