I’ve been using the
MCMCglmmpackage recently. I am confused by what is referred to in the documentation as R-structure and G-structure. These seem to relate to the random effects – in particular specifying the parameters for the prior distribution on them, but the discussion in the documentation seems to assume that the reader knows what these terms are. For example:
optional list of prior specifications having 3 possible elements: R (R-structure) G (G-structure) and B (fixed effects)………… The priors for the variance structures (R and G) are lists with the expected (co)variances (V) and degree of belief parameter (nu) for the inverse-Wishart
…taken from from here.
EDIT: Please note that I have re-written the rest of the question following the comments from Stephane.
Can anyone shed light on what R-structure and G-structure are, in the context of a simple variance components model where the linear predictor is
with e0ij∼N(0,σ20e) and u0j∼N(0,σ20u)
I made the following example with some data that comes with
> require(MCMCglmm) > require(lme4) > data(PlodiaRB) > prior1 = list(R = list(V = 1, fix=1), G = list(G1 = list(V = 1, nu = 0.002))) > m1 <- MCMCglmm(Pupated ~1, random = ~FSfamily, family = "categorical", + data = PlodiaRB, prior = prior1, verbose = FALSE) > summary(m1) G-structure: ~FSfamily post.mean l-95% CI u-95% CI eff.samp FSfamily 0.8529 0.2951 1.455 160 R-structure: ~units post.mean l-95% CI u-95% CI eff.samp units 1 1 1 0 Location effects: Pupated ~ 1 post.mean l-95% CI u-95% CI eff.samp pMCMC (Intercept) -1.1630 -1.4558 -0.8119 463.1 <0.001 *** --- > prior2 = list(R = list(V = 1, nu = 0), G = list(G1 = list(V = 1, nu = 0.002))) > m2 <- MCMCglmm(Pupated ~1, random = ~FSfamily, family = "categorical", + data = PlodiaRB, prior = prior2, verbose = FALSE) > summary(m2) G-structure: ~FSfamily post.mean l-95% CI u-95% CI eff.samp FSfamily 0.8325 0.3101 1.438 79.25 R-structure: ~units post.mean l-95% CI u-95% CI eff.samp units 0.7212 0.04808 2.427 3.125 Location effects: Pupated ~ 1 post.mean l-95% CI u-95% CI eff.samp pMCMC (Intercept) -1.1042 -1.5191 -0.7078 20.99 <0.001 *** --- > m2 <- glmer(Pupated ~ 1+ (1|FSfamily), family="binomial",data=PlodiaRB) > summary(m2) Generalized linear mixed model fit by the Laplace approximation Formula: Pupated ~ 1 + (1 | FSfamily) Data: PlodiaRB AIC BIC logLik deviance 1020 1029 -508 1016 Random effects: Groups Name Variance Std.Dev. FSfamily (Intercept) 0.56023 0.74849 Number of obs: 874, groups: FSfamily, 49 Fixed effects: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.9861 0.1344 -7.336 2.2e-13 ***
So based on the comments from Stephane I think the G structure is for σ20u. But the comments also say that the R structure is for σ20e yet this does not seem to appear in the
Note that the results from
lme4/glmer()are consistent with both examples from MCMC
So, is the R structure for σ20e and why doesn’t this appear in the output for
I would prefer to post my comments below as a comment but this would not be enough. These are questions rather than an answer (simlarly to @gung I don’t feel strong enough on the topic).
I am under the impression that MCMCglmm does not implement a “true” Bayesian glmm. The true Bayesian model is described in section 2 of this paper. Similarly to the frequentist model, one has g(E(y∣u))=Xβ+Zu and there is a prior required on the dispersion parameter ϕ1 in addition to the fixed parameters β and the “G” variance of the random effect u.
But according to this MCMCglmm vignette, the model implemented in MCMCglmm is given by g(E(y∣u,e))=Xβ+Zu+e , and it does not involve the dispersion parameter ϕ1. It is not similar to the classical frequentist model.
Therefore I would be not surprised that there is no analogue of σe with glmer.
Please apologize for these rough comments, I just took a quick look about that.