I have a (Gaussian linear) multivariate model of tree traits with a single 8-vector of traits measured on each of about 1000 trees over about 90 locations and 5 species. After adjusting for the effect of study from which the data was collected, I’m more or less interested in the covariance structure of traits as attributed to variability across species, to variability across locations (or species “subpopulations”) within species and to variability across trees within locations within species (3 nested levels). Again, there is one 8-vector observation per tree, so, as you see in my code, below, I will get one tree level random effect vector per observation vector. Thus, I set_rescor(FALSE) as the correlation among traits at the tree level is handled by the tree random effects specification via the |id3| being shared among the 8 traits’ tree random effects. But then this estimates a non-correlated error vector, which, I might be distinguishable (identifiable) from the correlated error (via the tree effects), but mixing is poor and takes about 4.5 hours on my Mac Studio with M1 Ultra.
So, now I want a model that omits the uncorrelated error vectors (as in non-gaussian models), i.e., with zero error, along with the tree level effects (which act as the correlated error) (and with the other effects). I can get this “zero (non-correlated) error” behavior if I omit the tree level effects and set_rescor(TRUE) (results look great (not shown)), but I eventually want to model these effects (whether via tree level effects or residuals) as a function of species (a different covariance component per species). I see how to do that via random effects with (1|id3|gr(sp:loc:tree, by=sp)) (I’ve done this with the other random effects (not shown in code below)), but I don’t see how to get this via a heterogeneous correlated residual structure specification. So, I can get what I want via random effects, but seem to have to settle for the uncorrelated residuals, which, as I mentioned, seem to cause a mixing (perhaps weak identifiability) problem.
So, again, (1) can I specify zero errors or (2) can I specify correlated residuals to vary with the level of species (analogous to the random effects specification (1|id3|gr(sp:loc:tree, id=sp))?
I’ve seen discussions related to (2) but could not make much hay from them. Help appreciated.
Best,
Jay
form1<- bf(mvbind(d13C,Cond,SLA,SS_conc,
ST_conc,WD,diameter,mean_rw) ~
study + (1|id1|sp) + (1|id2|sp:loc) + (1|id3|sp:loc:tree))
fit1<- brm(form1 + set_rescor(FALSE), data=trait.dat, chains=4, cores=4, threads=4,
iter=8000, warmup=4000, seed=24601, backend="cmdstanr")
- Operating System: Mac OS Sonoma 14.5
- brms Version: 2.21.0