daniel1noble / metaAidR

Functions for aiding meta-analyses in Ecology, Evolution and beyond
7 stars 6 forks source link

Dealing with variable RE structures for I2 #2

Closed daniel1noble closed 7 years ago

daniel1noble commented 7 years ago

Need to sort out some checks with the I2 function to calculate I2 based on variable random effect structures (i.e. phylogeny, spp, study) or only species and study. This is a bit more complicated than anticipated because equations change as the random effect structure changes. There are a few easy roads, but must be an easier more general way to do this. d3f3a48

daniel1noble commented 7 years ago

Implemented a slightly more general approach, which should deal with different random effect structures. Only more complicated thing is phylogenetic heritability because sampling error variance is not part of this equation, so this RE needs to be extracted and used in a seperate equation. An argument that specifies the phylogenetic RE will probably suffice. Needs more testing.