[R-sig-ME] 2 correlated random effects with quadrature?

Ross Boylan ross at biostat.ucsf.edu
Thu Mar 14 01:34:26 CET 2013

On 3/12/2013 2:18 PM, Ben Bolker wrote:
> Ross Boylan <ross at ...> writes:
>> Is there a way to fit generalized linear mixed model with 2 correlated
>> random effects in R, using quadrature?  At the moment, I'm only
>> concerned with binary outcomes.
>> When I try glmer from lme4 with the quadrature argument I get
>> Error: AGQ only defined for a single scalar random-effects term
>> Yes, I know 2 dimensional quadrature is slow.
>> Ross Boylaln
>    I don't know offhand of an R package that will do this.  I'm pretty
> sure AS-REML uses PQL (not even Laplace approximation): AD Model Builder can
> only do GHQ for nested/grouped models (i.e. not crossed) with a single
> random effect per block.
I'm not sure if it matters, but the 2 random effects are both within the 
same cluster; they are for intercepts and slopes.  The clusters 
themselves are not crossed or nested.
>   As far as I know you're simply out of luck:
Back to SAS nlmixed...  For some reason I'm having trouble piping 
results from R to SAS on Linux.
> both GHQ and the ability to handle crossed random effects are fairly
> rare among GLMM platforms, and the combination seems even rarer.
> I presume you've (1) compared Laplace approximation to GHQ with simpler
> examples and (2) compared Laplace approximation to 'truth' in simulations
> and found it wanting in one or both cases?
The main reason is that we want to compare the results with a more 
complicated model fit using 2-dimensional quadrature.  The more 
complicated model, in R, takes into account the sampling scheme that 
generated the data, which we are simulating.
>   One alternativepossibility
> for improving the quality of the approximation would be to use importance
> sampling in AD Model Builder ...

More information about the R-sig-mixed-models mailing list