3: Uploading Data Get datasets into R or use a Metafor library dataset Meta-analysis in R with Metafor
Built-in Datasets Metafor comes with many datasets in a library Viechtbauer uses dat.bcg as an illustration in his 2010 paper on metafor I’ll use the validity of employment interviews in dat.mcdaniel1994 for illustrations
Create Dataset in Excel Create columns for variables Author Date Effect size data (Hedges approach; Borenstein et al., 2009 book; little bit of Schmidt & Hunter) Effect Size (ES), Sampling Variance (V) of ES Data to compute ES and V Moderators Must find or compute a common (across studies) ES and V
Example Dataset McLeod2007.xlsx – parenting and childhood depression McLeod, B. D., Weisz, J. R., Wood, J. J., (2007). Examining the association between parenting and childhood depression: A meta-analysis. Clinical Psychology Review, 27, ES – Correlation (r) Variance – From sample size (N) Moderator – Both parents (B) or just mothers (M) Has Author, Year Has other moderators related to either parenting or depression measures – let’s take a peek
Reading.xlsx files > Invoke R > library(xlsx) > data <- read.xlsx(“path/filename.xlsx”, sheetName = “nameofsheet”) Examples Read McLeod.xlsx Print it Print built-in library data: dat.mcdaniel1994
Video instructions from Youtube For reading an Excel file into R: eJTNBDdKgJgJzaQcY6OXmsXAHU&index=4