The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


faq

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
faq [2021/11/05 09:40] Wolfgang Viechtbauerfaq [2021/11/08 13:10] Wolfgang Viechtbauer
Line 27: Line 27:
    vi <- runif(k, .01, 1)                   # simulate sampling variances    vi <- runif(k, .01, 1)                   # simulate sampling variances
    yi <- rnorm(k, 0, sqrt(vi))              # simulate effect sizes with heteroscedastic sampling variances    yi <- rnorm(k, 0, sqrt(vi))              # simulate effect sizes with heteroscedastic sampling variances
-   pval[i] <- rma(yi, vi, method="FE")$pval # fit model and store p-value+   pval[i] <- rma(yi, vi, method="EE")$pval # fit model and store p-value
 } }
 mean(pval <= .05)                           # compute empirical rejection rate (should be ~0.05) mean(pval <= .05)                           # compute empirical rejection rate (should be ~0.05)
faq.txt · Last modified: 2023/01/24 07:56 by Wolfgang Viechtbauer