Hi, I'm using MCMCglmm to run some binary and Poisson models and I'd just like to check whether I'm specifying a nested random effect correctly. I have 773 data points, each one corresponding to a chick in a nest. I want to test for differences between half-siblings so I'm using three random effects: natal year, nest and pairID. There are 17 natal years so year was included as a blocking factor. There are 245 nests each with a unique number, and 177 different parent pairs, each with a unique number. Some parent pairs have >1 nest so nest is nested within pairID. My understanding is that in lmer (1|pairID/nest) is equivalent to (1|pairID) + (1|pairID:nest) which is equivalent to (1|pairID) + (1|nest) as long as each level of nest has a unique value, which it does. Using my dataset in a binary model I get the same results for each of the above in lmer so that's fine. I'm just wondering whether this is the same when specifying nested random effects in MCMCglmm? I'm guessing it's not as specifying random ~ pairID + nest compared to random ~ pairID + pairID:nest in the model below gives me different significance levels for one of my main effects. Comparing these results with the binary model in lmer suggests that I should probably be using ~ pairID + pairID:nest when using MCMCglmm but I'm not completely sure. Is this correct or should I be able to use either?? priorX1 = list(R = list(V = 1, n = 0, fix = 1), G = list(G1 = list(V = 1, n = 0.002), G2 = list(V = 1, n = 0.002))) modelX1 <- MCMCglmm(y ~ C + D + C:D, random = ~ natalyr + pairID + pairID:nest, family = "categorical", data =early, prior = priorX1, burnin = 3000, nitt = 1003000, thin=1000) Thanks, Rebecca Sardell PhD Student Institute of Biological & Environmental Sciences University of Aberdeen Zoology Building Tillydrone Avenue Aberdeen AB24 2TZ Scotland The University of Aberdeen is a charity registered in Scotland, No SC013683.
nested random effect specification in MCMCglmm
2 messages · Sardell, Rebecca, Jarrod Hadfield
1 day later
Hi Rebecca, If every nest has a unique identifier then MCMCglmm should give the same answer (up to Monte Carlo error) for random ~ pairID + nest and random ~ pairID + pairID:nest, so a difference is worrying. Can the difference for the significance be explained by Monte Carlo error? Perhaps you could post the summaries from the two models? Cheers, Jarrod Quoting "Sardell, Rebecca" <rebecca.sardell at abdn.ac.uk>:
Hi, I'm using MCMCglmm to run some binary and Poisson models and I'd just like to check whether I'm specifying a nested random effect correctly. I have 773 data points, each one corresponding to a chick in a nest. I want to test for differences between half-siblings so I'm using three random effects: natal year, nest and pairID. There are 17 natal years so year was included as a blocking factor. There are 245 nests each with a unique number, and 177 different parent pairs, each with a unique number. Some parent pairs have >1 nest so nest is nested within pairID. My understanding is that in lmer (1|pairID/nest) is equivalent to (1|pairID) + (1|pairID:nest) which is equivalent to (1|pairID) + (1|nest) as long as each level of nest has a unique value, which it does. Using my dataset in a binary model I get the same results for each of the above in lmer so that's fine. I'm just wondering whether this is the same when specifying nested random effects in MCMCglmm? I'm guessing it's not as specifying random ~ pairID + nest compared to random ~ pairID + pairID:nest in the model below gives me different significance levels for one of my main effects. Comparing these results with the binary model in lmer suggests that I should probably be using ~ pairID + pairID:nest when using MCMCglmm but I'm not completely sure. Is this correct or should I be able to use either?? priorX1 = list(R = list(V = 1, n = 0, fix = 1), G = list(G1 = list(V = 1, n = 0.002), G2 = list(V = 1, n = 0.002))) modelX1 <- MCMCglmm(y ~ C + D + C:D, random = ~ natalyr + pairID + pairID:nest, family = "categorical", data =early, prior = priorX1, burnin = 3000, nitt = 1003000, thin=1000) Thanks, Rebecca Sardell PhD Student Institute of Biological & Environmental Sciences University of Aberdeen Zoology Building Tillydrone Avenue Aberdeen AB24 2TZ Scotland The University of Aberdeen is a charity registered in Scotland, No SC013683.
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.