[R-meta] Question about inverse variance weighting using the Metafor package
I am using the Metafor package for the first time. I read the documentation and wanted to confirm that I am doing the correct steps to computing the weighted mean difference where the weights are inverse variance. My data set has inputs for each study of n_control, n_treatment, mean_controls, mean_treatment, sd_controls, and sd_treatment. Am I correct that to do the inverse weighting I need to do the following: (1) Compute the pooled variance by defining variance= sd_controls^2+ sd_treatment^2 (2) Define my variables as below: fig_1 <- escalc(n1i = n_controls, n2i = n_treatment, m1i = mean_controls, m2i = mean_ treatment, sd1i = sd_controls, sd2i = sd_ treatment, data = fig_1, measure = "MD", append = TRUE) (3) Then for my fixed effects model weighting by 1/variance, run rma(yi, vi, method="FE",weights=1/var_total,data=fig_1) (4) And for my variable effects model weighted by 1/variance, run rma(yi, vi, weights=1/var_total,data=fig_1) Appreciate you feedback or corrections on this approach. Thank you, Howard
Columbia University School of International and Public Affairs; School of Public Health www.linkedin.com/in/howard-friedman-590ba8 www.Howard-Friedman.com [[alternative HTML version deleted]]