Appendix: Original Source Code
Raw R Logic from 2017 Workshop
Introduction
This appendix contains the original wkshp_meta.R source code. It is provided here for forensic completeness.
Source Code
# Chunk 1: Calculator
2 + 2
# Chunk 4: Schmidt Data simulation
Study <- c(1:21)
r <- c(.04,.14,.31,.12,.38,.27,.15,.36,.20,.02,.23,.11,.21,.37,.14,.29,.26,.17,.39,.22,.21)
se <- c(.12,.12,.11,.12,.10,.11,.12,.11,.12,.12,.12,.12,.12,.11,.12,.11,.11,.12,.10,.12,.12)
schmidt <- data.frame(Study,r,se)
# Chunk 7: Omnibus Analysis
library(metafor)
omn <- rma(r, vi=se^2, data=schmidt, subset=Study==c(1:5))
forest(omn, slab=paste(1:5))
# Chunk 25: Compute ES Function
compute_dgs <- function(n.1, m.1, sd.1, n.2, m.2, sd.2, data, denom = "pooled.sd") {
# ... (See Module 06 for full robust implementation) ...
# ... (See Module 06 for full robust implementation) ...
}Note: The full calculational logic has been ported to the interactive WebR chunks in Modules 06 (Calculation) and 09 (Omnibus).