[R-sig-ME] Bivariate MCMCglmm with uneven number of repeats

Louc Yates |ouc@y@te@22 @end|ng |rom gm@||@com
Fri Sep 9 13:12:03 CEST 2022


Dear list,

I would like to test for covariation between two traits, aggression (count
data, poisson distribution) and glucocorticoids (gaussian), using a
bivariate MCMCglmm.

During data collection, aggression assays were conducted immediately after
collection of samples for glucocorticoids. However, additional
glucocorticoid samples were also collected without any aggression assays
being collected. Therefore, I have more glucocorticoid values than I do
aggression scores. If possible, I would like to include all
glucocorticoid values,
rather than just the samples that were collected at the same time
aggression assays were performed.

I have tried running a bivariate MCMCglmm using a wide data frame, where
each row contains an aggression and glucocorticoid value (both collected at
the same time) and the remaining glucocorticoid values on rows that contain
an NA where the paired aggression data should be. However, MCMCglmm will
not run models using this data format as it does not accept NAs.

I have also restructured my data to a long/stacked format, where each row
contains information on a single trait (similar to the data structure
needed for the 'covu' method) and the model runs successfully and the
diagnostics look fine.

My question is: is running a bivariate model with an uneven number of
repeats for either trait statistically 'sound'? Am I unknowingly violating
any assumptions? I only ask as I have not run bivariate models using this
data structure before and want to make sure it is fine to do it this way.

Best wishes
Lou


In case this provides any useful info, below is an example of my prior
specification and model structure.

prior <- list(G = list(G1 = list(V = diag(2), nu = 1.002), *#2-way var-cov
matrix of IndividualID for AGGRESSION + CORT*
                                  G2 = list(V = diag(1), nu = 0.002), *#rand
effect for TestChamber (fitted for AGGRESSION)*
                                  G3 = list(V = diag(1), nu = 0.002),*#rand
effect for BirthYear (fitted for CORT)*
                                  G4 = list(V = diag(1), nu = 0.002)), *#rand
effect for LabID (CORT)*
                     R = list(R1 = list(V = diag(2), nu = 1.002)))  *#2-way
var-cov matrix of resid for AGGRESSION + CORT*


m1<- MCMCglmm(Aggression.CORT.data ~ variable - 1 +
at.level(variable, "AGGRESSION"):rescale(Sex) +
at.level(variable, "AGGRESSION"):rescale(Age_years) +
at.level(variable, "CORT"):rescale(Age_years),
random = ~us(variable):IndividualID +
us(at.level(variable,"AGGRESSION")):TestChamber+
us(at.level(variable,"CORT")):BirthYear+
us(at.level(variable,"CORT")):LabID,
rcov = ~idh(variable):units,
family = NULL, # specified already in the data
prior = prior,
nitt=5000000,
burnin=50000,
thin=500,
verbose = FALSE,
pr=FALSE,
data = data)

	[[alternative HTML version deleted]]



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