I've been using the MCMCglmm
package 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 $$\beta_0 + e_{0ij} + u_{0j} $$ with $e_{0ij} \sim N(0,\sigma_{0e}^2)$ and $u_{0j} \sim N(0,\sigma_{0u}^2)$
I made the following example with some data that comes with MCMCglmm
> 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 $\sigma_{0u}^2$. But the comments also say that the R structure is for $\sigma_{0e}^2$ yet this does not seem to appear in the lme4
output.
Note that the results from lme4/glmer()
are consistent with both examples from MCMC MCMCglmm
.
So, is the R structure for $\sigma_{0e}^2$ and why doesn't this appear in the output for lme4/glmer()
?
lme4
). Maybe I am missing something ? $\endgroup$