[R-meta] testing for and visualizing correlation between dependent traits in bivariate meta-analysis
Hi Sigurd,
To add to Wolfgang's note on outliers, could you share more about how these
traits are measured and what the units of the effect sizes are? Just based
on descriptive plots of the effect estimates, they appear to be strongly
right-skewed:
new_data_transf <-
new_data %>%
mutate(
vi = if_else(dep.trait == "lambda", v1i, v2i),
sei = sqrt(vi),
lnyi = log(yi),
sei_ln = sei / yi
)
ggplot( new_data_transf, aes(yi, fill = dep.trait)) + geom_density(alpha =
0.4) + facet_wrap(~ dep.trait)
ggplot(new_data_transf, aes(yi, sei)) + geom_point() + facet_wrap(~
dep.trait)
Log transformation leads to a distribution much closer to symmetric:
ggplot(new_data_transf, aes(yi, fill = dep.trait)) + geom_density(alpha =
0.4) + facet_wrap(~ dep.trait) + scale_x_continuous(transform = "log")
ggplot(new_data_transf, aes(lnyi, sei_ln)) + geom_point() + facet_wrap(~
dep.trait) + scale_x_continuous()
Best,
James
On Thu, Oct 31, 2024 at 7:46?AM Viechtbauer, Wolfgang (NP) via
R-sig-meta-analysis <r-sig-meta-analysis at r-project.org> wrote:
Hi Sigurd, Thanks for the fully reproducible code/data. As for the difference between the parameter estimates from the model and computations based on the random effects, you will find some discussions of this in the archives. A quick search yielded: https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2023-May/004627.html but I vaguely remember other threads where this has come up (not in connection with the correlation, but the variance). For you data, I examined the species-level standardized residuals: rstandard(mod1, cluster=new_data$species)$cluster and the Cook's distances: cds <- cooks.distance(mod1, cluster=new_data$species) par(mar=c(4,12,2,2)) barplot(cds, horiz=TRUE, las=1, xlab="Cook's Distance") I would start by checking what is going with the data for these species. Best, Wolfgang
-----Original Message----- From: R-sig-meta-analysis <r-sig-meta-analysis-bounces at r-project.org>
On Behalf
Of Sigurd Einum via R-sig-meta-analysis Sent: Thursday, October 31, 2024 09:56 To: R-sig-meta-analysis at r-project.org Cc: Sigurd Einum <sigurd.einum at ntnu.no> Subject: [R-meta] testing for and visualizing correlation between
dependent
traits in bivariate meta-analysis I have a data set where two traits (lambda and lFC.inf) are measured simultaneously in different species, and the same species may be
observed in
more than one experiment. I apply a bivariate model to these data, where
I want
to check whether the two traits are correlated across species (e.g. does
species
that have a large value for one trait have a small value for the other).
For
this, I compare two models with struct ="UN" or struct = "DIAG", using
AICc.
This gives strong support for the model with struct = "UN", with an
estimated
negative correlation of -0.71. I want to visualize this pattern, and naively thought that I could just
obtain
the species-level random effects for lambda and lFC.inf from this model (obtained using ranef) and make a plot between them. However, this plot
shows a
very (unrealistic) tight relationship, and the negative correlation
between
these is considerably stronger (-0.94) than what the model estimated. Interestingly, when I do the same for the model with struct = "DIAG", the correlation becomes more similar to the one estimated in the model
(-0.67).
So my questions are (1) is my interpretation of the model comparison
correct?
and (2) how do I best visualize the result in a figure? See below for script. Any input on this would be greatly appreciated. Best, Sigurd Einum
_______________________________________________ R-sig-meta-analysis mailing list @ R-sig-meta-analysis at r-project.org To manage your subscription to this mailing list, go to: https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis