The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


tips:weights_in_rma.mv_models

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tips:weights_in_rma.mv_models [2021/07/31 09:10] Wolfgang Viechtbauertips:weights_in_rma.mv_models [2021/07/31 09:32] Wolfgang Viechtbauer
Line 271: Line 271:
 <code rsplus> <code rsplus>
 data.frame(k = c(table(dat$district)), data.frame(k = c(table(dat$district)),
-           weight = sapply(split(wi, dat$district), sum))+           weight = tapply(wi, dat$district, sum))
 </code> </code>
 <code output> <code output>
tips/weights_in_rma.mv_models.txt · Last modified: 2023/08/03 13:37 by Wolfgang Viechtbauer