Skip to content

Instantly share code, notes, and snippets.

View Yefeng0920's full-sized avatar

Yefeng Yefeng0920

View GitHub Profile
@Yefeng0920
Yefeng0920 / RVE-hierarchical.R
Created February 27, 2025 00:11 — forked from jepusto/RVE-hierarchical.R
Hierarchical effects example from Tanner-Smith & Tipton (2013)
# robumeta calculations
library(grid)
library(robumeta)
data(hierdat)
HTJ <- robu(effectsize ~ males + binge,
data = hierdat, modelweights = "HIER",
studynum = studyid,
var.eff.size = var, small = FALSE)
@Yefeng0920
Yefeng0920 / metafor-sandwich.R
Created February 27, 2025 00:11 — forked from jepusto/metafor-sandwich.R
Calculate sandwich covariance estimators for multi-variate meta-analysis models
require(Formula)
require(metafor)
require(sandwich)
require(zoo)
require(lmtest)
#-----------------------------------------------
# Functions for making sandwich standard errors
#-----------------------------------------------
@Yefeng0920
Yefeng0920 / RVE-correlated.R
Created February 27, 2025 00:10 — forked from jepusto/RVE-correlated.R
Correlated effects example from Tanner-Smith & Tipton (2013)
# robumeta calculations
library(grid)
library(robumeta)
data(corrdat)
rho <- 0.8
HTJ <- robu(effectsize ~ males + college + binge,
data = corrdat,
modelweights = "CORR", rho = rho,
studynum = studyid,
@Yefeng0920
Yefeng0920 / metafor-BRL.R
Created February 25, 2024 14:22 — forked from jepusto/metafor-BRL.R
Bias-reduced linearization covariance estimator and degrees of freedom for multi-variate meta-analysis models
require(Formula)
require(metafor)
require(sandwich)
require(zoo)
require(lmtest)
#-----------------------------------------------
# Identify outer-most clustering variable
#-----------------------------------------------