Hi everyone,

Since metafor doesn't have its own list, I hope this is the correct place
for this posting- my apologies if there is a more appropriate list.
I'm conducting a meta-analysis where I would like to determine the
correlation between plasticity in leaf traits and climate. I'm calculating
effect sizes as Hedge's d. My data is structured so that each study
collected data from one forest site, so there is one set of climate
variable values for that study, and there are one or more species in each
study, so all the species in a study have the same values for the climate
variables. I'm not sure how to account for this structure in modeling the
relationship between plasticity and climate.

My first thought was to calculate mean effect size and variance across
species for every study with multiple species and correlate that    with
the climate variable values for those study with the rma() function, but
trying to do that returns an error message:

rma(yi = EffectSize, vi = Var, data = sitestable, mod = Precip)
returns: Error in wi * (yi - X %*% b)^2 : non-conformable arrays

This leaves me with two questions: 1) Am I even accounting for the data
structure correctly with this approach, and 2) am I fundamentally
misunderstanding how to use metafor to do so?

Thanks very much for your help!

Best,

Megan

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to