[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-mixed-models
Subject:    Re: [R-sig-ME] Trait specific random effects and covariance between them in MCMCglmm
From:       David Duffy <David.Duffy () qimrberghofer ! edu ! au>
Date:       2020-12-09 22:17:20
Message-ID: 7081f38fd8bd4e8ebaf75d6eda640431 () qimrberghofer ! edu ! au
[Download RAW message or body]


________________________________________
From: R-sig-mixed-models <r-sig-mixed-models-bounces@r-project.org> on behalf of \
                Benedikt Holtmann <holtmann@biologie.uni-muenchen.de>
Sent: Wednesday, 9 December 2020 6:28:24 PM
To: r-sig-mixed-models@r-project.org
Subject: [R-sig-ME] Trait specific random effects and covariance between them in \
MCMCglmm

Dear list members,

I'm trying to estimate the covariance and correlation of observer-effects
between male and female exploration scores in a bivariate model.
My problem is that observers can differ between males and females (not
always measured together). I use str() to allow covariances to exist
between ObserverFemale and ObserverMale.

My model looks as follows:
prior_multi_2 <- list(R = list(V = diag(2), nu = 0.002), G = list(
  G1 = list(V = diag(2), nu = 2, alpha.mu = rep(0, 2), alpha.V = diag(2) *
1000),
  G2 = list(V = diag(2), nu = 2, alpha.mu = rep(0, 2), alpha.V = diag(2) *
1000),
  G3 = list(V = diag(2), nu = 2, alpha.mu = rep(0, 2), alpha.V = diag(2) *
1000),
  G4 = list(V = diag(2), nu = 2, alpha.mu = rep(0, 2), alpha.V = diag(2) *
1000),
  G5 = list(V = diag(4), nu = 4, alpha.mu = rep(0, 4), alpha.V = diag(4) *
1000)
))

Biv_MCMC <- MCMCglmm(cbind(scale(ExpScoreFemale), scale(ExpScoreMale)) ~
(trait - 1) +
  at.level(trait, 1):scale(AgeFemale) +
  at.level(trait, 2):scale(AgeMale) +
random = ~ us(trait):PairID + us(trait):Plot + us(trait):Year +
us(trait):NestBox + us(trait):str(ObserverFemale + ObserverMale),
rcov = ~ us(trait):units,
prior = prior_multi_2, data = exploration_data, nitt = 13000 * 10, burnin =
3000 * 10, thin = 10 * 10,
pr = TRUE, saveX = TRUE, saveZ = TRUE,
family = c("gaussian", "gaussian")
)

However, since ObserverFemale and ObserverMale are trait-specific, I was
wondering whether there is a way to model trait-specific observer random
effects such as: us(trait):str(at.level(trait,1):ObserverFemale +
at.level(trait,2):ObserverMale)?

I saw that this is possible in ASReml. For example, Class& Brommer 2018,
BiologyLetters 14:20180106 used:
random = ~ str(~at(trait,1):ObserverFemale + at(trait,2):ObserverMale~
us(2):id(12))

Is it possible to fit something similar in MCMCglmm?

Best regards,
Benedikt

-------------------------------------------------------
*Dr Benedikt Holtmann*
DFG Research Fellow
Behavioural Ecology, Department of Biology II
Ludwig-Maximilians-University of Munich
Großhaderner Straße 2
82152 Planegg-Martinsried
Germany

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
[EXTERNAL EMAIL] This message originates from an external email address, please \
exercise caution when clicking any links or opening attachments. If you believe the \
sender is impersonating someone at QIMR Berghofer, please forward this message to \
phishing@qimrberghofer.edu.au.

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic