[R-sig-ME] Finding the best package for a mixed Poisson model
Ben Bolker
bbo|ker @end|ng |rom gm@||@com
Sat Nov 23 01:34:21 CET 2019
On Fri, Nov 22, 2019 at 5:46 PM Nik Tuzov <ntuzov using ntuzov.com> wrote:
>
>
> Hello:
>
> Couldyou help me get oriented among various packages to fit a mixedPoisson model. The goal is to find a relatively fast method that cantake at least two random factors, possibly with interaction, e.g.:
>
> Y~ fixed part + A + B + A*B
>
> Ihave looked at SAS GLIMMIX, lme4::glmer, glmmPQL, glmmTMB, andGLMMadaptive. I have stayed away from simulation/MCMC based methodsfor speed reasons. My questions are:
>
> 1)Are there any more packages that are consistent with my objective?
technically glmmPQL is a function within the MASS package.
If you're going to use SAS I might recommend PROC MIXED over GLIMMIX
(see below).
>
> 2)GLIMMIX (with default METHOD = RSPL option) and glmmPQL refer to thesame two papers: Wofinger, O’Connell, 1993 and Breslow, Clayton,1993. Does this mean that glmmPQL was meant to reproduce the defaultGLIMMIX? If yes, are they really consistent?
I don't know if they're exactly the same, but they're implementing
similar methods (I don't know all the options within GLIMMIX ...)
>
> 3)This reference:
>
> https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#fitting-models-with-overdispersion
>
> claimsthat previously lme4 had a functionality similar to glmmPQL but thenit was removed altogether because it was “deemed unreliable”.That implies that the default estimation method in GLIMMIX is veryunreliable (see 2)). Is it really that bad? If yes, why didn’t SASpick a different default (or maybe they did it in some newer PROC)?
This is a bit of a long story.
(1) PQL is indeed a worse approximation in some limits (e.g. Poisson
samples with a small mean *and* small number of samples per group)
[e.g. see the Breslow "Whither PQL?" paper].
(2) The developers noticed some weird results from PQL when
implemented in lme4, but these probably had less to do with PQL itself
than with the ways in which it interacted with the way that GLMMs are
otherwise implemented in lme4. Because of #1, it was deemed less
important.
>
> 4)Presently glmer uses Laplace or Gauss-Hermite quadrature, the latteronly if there is one random term in the model. How consistent is itwith the corresponding SAS options METHOD = LAPLACE and METHOD=QUAD ?
I didn't realize that GLIMMIX had LAPLACE and QUAD methods, but
yes, those sound similar to nAGQ=1 (default) and nAGQ>1 options in
lme4. (I don't know whether GLIMMIX does *adaptive* Gauss-Hermite
quadrature, which is important ...)
>
> 5)GLMMadaptive can use the quadrature with more than one random term:
>
> https://stats.stackexchange.com/questions/403147/an-r-package-for-glmm-estimation-with-two-random-effects
>
> Thedocumentation says that it’s based on the paper of Pinheiro &Bates, 1995, then why is it not available in glmer which is supportedby Bates? Is that because the GLMMadaptive results are unreliable?
Because the glmer developers never got around to implementing it.
While being able to do AGQ on arbitrarily many random effects is
certainly convenient, there's a relatively narrow set of problems for
which AGQ on multiple REs is both useful (i.e. Laplace isn't good
enough) *and* computationally feasible (the computational burden of
AGQ increases rapidly with dimensionality/number of rEs).
My advice: try a few of these methods and see if the answers differ
much, then choose the most convenient tool that seems adequate. Most
of the R packages have fairly similar interfaces, so it shouldn't be
too hard to try a variety of them.
> Thanksin advance,
>
> NikTuzov
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list