The function smd_rd computes covariance between standardized mean difference and risk difference. See mix.vcov for effect sizes of the same or different types.

smd_rd(d, r, n1c, n2c, n1t, n2t,
       n12c = min(n1c, n2c), n12t = min(n1t, n2t),
       s2c, s2t, f2c, f2t, sd1c, sd1t)

Arguments

d

Standardized mean difference for outcome 1.

r

Correlation coefficient of the two outcomes.

n1c

Number of participants reporting outcome 1 in the control group.

n2c

Number of participants reporting outcome 2 in the control group.

n1t

Number of participants reporting outcome 1 in the treatment group.

n2t

Number of participants reporting outcome 2 in the treatment group.

n12c

Number of participants reporting both outcome 1 and outcome 2 in the control group. By default, it is equal to the smaller number between n1c and n2c.

n12t

Number defined in a similar way as n12c for the treatment group.

s2c

Number of participants with event for outcome 2 (dichotomous) in the control group.

s2t

Defined in a similar way as s2c for the treatment group.

f2c

Number of participants without event for outcome 2 (dichotomous) in the control group.

f2t

Defined in a similar way as f2c for the treatment group.

sd1c

Sample standard deviation of outcome 1 for the control group.

sd1t

Defined in a similar way as sd1c for the treatment group.

Author

Min Lu

Value

gComputed Hedge's g from the input argument d for outcome 1.
rdComputed risk difference for outcome 1.
vComputed covariance.

References

Ahn, S., Lu, M., Lefevor, G.T., Fedewa, A. & Celimli, S. (2016). Application of meta-analysis in sport and exercise science. In N. Ntoumanis, & N. Myers (Eds.), An Introduction to Intermediate and Advanced Statistical Analyses for Sport and Exercise Scientists (pp.233-253). Hoboken, NJ: John Wiley and Sons, Ltd.

Wei, Y., & Higgins, J. (2013). Estimating within study covariances in multivariate meta-analysis with multiple outcomes. Statistics in Medicine, 32(7), 119-1205.

Examples

## simple example smd_rd(d = 1, r = 0.71, n1c = 34, n2c = 35, n1t = 25, n2t = 32, s2c = 5, s2t = 8, f2c = 30, f2t = 24, sd1t = 0.4, sd1c = 8)
#> $g #> [1] 1.013393 #> #> $rd #> [1] 0.1071429 #> #> $v #> [1] 0.009820058 #>
## calculate covariances for variable SBP and DD in Geeganage2010 data attach(Geeganage2010)
#> The following objects are masked from Geeganage2010 (pos = 3): #> #> MD_DBP, MD_SBP, nc_D, nc_DBP, nc_DD, nc_SBP, nt_D, nt_DBP, nt_DD, #> nt_SBP, OR_D, OR_DD, sc_D, sc_DD, sdc_DBP, sdc_SBP, sdt_DBP, #> sdt_SBP, SMD_DBP, SMD_SBP, st_D, st_DD, studyID
#> The following objects are masked from Geeganage2010 (pos = 4): #> #> MD_DBP, MD_SBP, nc_D, nc_DBP, nc_DD, nc_SBP, nt_D, nt_DBP, nt_DD, #> nt_SBP, OR_D, OR_DD, sc_D, sc_DD, sdc_DBP, sdc_SBP, sdt_DBP, #> sdt_SBP, SMD_DBP, SMD_SBP, st_D, st_DD, studyID
#> The following objects are masked from Geeganage2010 (pos = 8): #> #> MD_DBP, MD_SBP, nc_D, nc_DBP, nc_DD, nc_SBP, nt_D, nt_DBP, nt_DD, #> nt_SBP, OR_D, OR_DD, sc_D, sc_DD, sdc_DBP, sdc_SBP, sdt_DBP, #> sdt_SBP, SMD_DBP, SMD_SBP, st_D, st_DD, studyID
#> The following objects are masked from Geeganage2010 (pos = 9): #> #> MD_DBP, MD_SBP, nc_D, nc_DBP, nc_DD, nc_SBP, nt_D, nt_DBP, nt_DD, #> nt_SBP, OR_D, OR_DD, sc_D, sc_DD, sdc_DBP, sdc_SBP, sdt_DBP, #> sdt_SBP, SMD_DBP, SMD_SBP, st_D, st_DD, studyID
#> The following objects are masked from Geeganage2010 (pos = 10): #> #> MD_DBP, MD_SBP, nc_D, nc_DBP, nc_DD, nc_SBP, nt_D, nt_DBP, nt_DD, #> nt_SBP, OR_D, OR_DD, sc_D, sc_DD, sdc_DBP, sdc_SBP, sdt_DBP, #> sdt_SBP, SMD_DBP, SMD_SBP, st_D, st_DD, studyID
#> The following objects are masked from Geeganage2010 (pos = 11): #> #> MD_DBP, MD_SBP, nc_D, nc_DBP, nc_DD, nc_SBP, nt_D, nt_DBP, nt_DD, #> nt_SBP, OR_D, OR_DD, sc_D, sc_DD, sdc_DBP, sdc_SBP, sdt_DBP, #> sdt_SBP, SMD_DBP, SMD_SBP, st_D, st_DD, studyID
#> The following objects are masked from Geeganage2010 (pos = 12): #> #> MD_DBP, MD_SBP, nc_D, nc_DBP, nc_DD, nc_SBP, nt_D, nt_DBP, nt_DD, #> nt_SBP, OR_D, OR_DD, sc_D, sc_DD, sdc_DBP, sdc_SBP, sdt_DBP, #> sdt_SBP, SMD_DBP, SMD_SBP, st_D, st_DD, studyID
#> The following objects are masked from Geeganage2010 (pos = 13): #> #> MD_DBP, MD_SBP, nc_D, nc_DBP, nc_DD, nc_SBP, nt_D, nt_DBP, nt_DD, #> nt_SBP, OR_D, OR_DD, sc_D, sc_DD, sdc_DBP, sdc_SBP, sdt_DBP, #> sdt_SBP, SMD_DBP, SMD_SBP, st_D, st_DD, studyID
#> The following objects are masked from Geeganage2010 (pos = 14): #> #> MD_DBP, MD_SBP, nc_D, nc_DBP, nc_DD, nc_SBP, nt_D, nt_DBP, nt_DD, #> nt_SBP, OR_D, OR_DD, sc_D, sc_DD, sdc_DBP, sdc_SBP, sdt_DBP, #> sdt_SBP, SMD_DBP, SMD_SBP, st_D, st_DD, studyID
SBP_DD <- unlist(lapply(1:nrow(Geeganage2010), function(i){smd_rd(d = SMD_SBP, r = 0.71, n1c = nc_SBP[i], n2c = nc_DD[i], n1t = nt_SBP[i], n2t = nt_DD[i], sd1t = sdt_SBP[i], s2t = st_DD[i], sd1c = sdc_SBP[i], s2c = sc_DD[i], f2c = nc_DD[i] - sc_DD[i], f2t = nt_DD[i] - st_DD[i])})) SBP_DD
#> g1 g2 g3 g4 g5 g6 #> -0.075002006 0.042843439 -0.248724125 -0.099414652 -0.004577713 -0.279271842 #> g7 g8 g9 g10 g11 g12 #> -0.559254263 -0.053615187 0.128979388 -0.069757204 0.014897040 -0.272593599 #> g13 g14 g15 g16 g17 rd #> 0.221784872 0.462340097 0.040394626 -0.231455720 -0.157661728 0.000000000 #> v g1 g2 g3 g4 g5 #> 0.052666420 -0.075548137 0.043155405 -0.250535223 -0.100138545 -0.004611046 #> g6 g7 g8 g9 g10 g11 #> -0.281305375 -0.563326502 -0.054005589 0.129918559 -0.070265145 0.015005513 #> g12 g13 g14 g15 g16 g17 #> -0.274578504 0.223399811 0.465706651 0.040688762 -0.233141077 -0.158809750 #> rd v g1 g2 g3 g4 #> 0.187500000 0.049876875 -0.073210382 0.041820008 -0.242782681 -0.097039866 #> g5 g6 g7 g8 g9 g10 #> -0.004468362 -0.272600684 -0.545894972 -0.052334444 0.125898369 -0.068090866 #> g11 g12 g13 g14 g15 g16 #> 0.014541184 -0.266081969 0.216486945 0.451295862 0.039429692 -0.225926778 #> g17 rd v g1 g2 g3 #> -0.153895554 0.025544554 0.010060989 -0.073202081 0.041815266 -0.242755154 #> g4 g5 g6 g7 g8 g9 #> -0.097028863 -0.004467856 -0.272569776 -0.545833078 -0.052328510 0.125884095 #> g10 g11 g12 g13 g14 g15 #> -0.068083146 0.014539535 -0.266051800 0.216462399 0.451244693 0.039425222 #> g16 g17 rd v g1 g2 #> -0.225901162 -0.153878105 0.040000000 0.010344569 -0.073089189 0.041750779 #> g3 g4 g5 g6 g7 g8 #> -0.242380776 -0.096879225 -0.004460966 -0.272149418 -0.544991293 -0.052247809 #> g9 g10 g11 g12 g13 g14 #> 0.125689956 -0.067978148 0.014517112 -0.265641495 0.216128571 0.450548783 #> g15 g16 g17 rd v g1 #> 0.039364420 -0.225552777 -0.153640794 0.019207502 0.006015570 -0.077018490 #> g2 g3 g4 g5 g6 g7 #> 0.043995316 -0.255411256 -0.102087488 -0.004700789 -0.286780271 -0.574290225 #> g8 g9 g10 g11 g12 g13 #> -0.055056671 0.132447094 -0.071632678 0.015297558 -0.279922479 0.227747722 #> g14 g15 g16 g17 rd v #> 0.474770450 0.041480666 -0.237678577 -0.161900580 -0.250000000 0.047621482 #> g1 g2 g3 g4 g5 g6 #> -0.073169824 0.041796840 -0.242648183 -0.096986107 -0.004465887 -0.272449667 #> g7 g8 g9 g10 g11 g12 #> -0.545592555 -0.052305452 0.125828623 -0.068053145 0.014533128 -0.265934564 #> g13 g14 g15 g16 g17 rd #> 0.216367014 0.451045851 0.039407849 -0.225801618 -0.153810299 -0.098312236 #> v g1 g2 g3 g4 g5 #> 0.008377819 -0.072988148 0.041693061 -0.242045701 -0.096745296 -0.004454799 #> g6 g7 g8 g9 g10 g11 #> -0.271773189 -0.544237878 -0.052175580 0.125516198 -0.067884172 0.014497043 #> g12 g13 g14 g15 g16 g17 #> -0.265274263 0.215829787 0.449925928 0.039310001 -0.225240965 -0.153428396 #> rd v g1 g2 g3 g4 #> 0.071196013 0.003338991 -0.073337607 0.041892683 -0.243204588 -0.097208501 #> g5 g6 g7 g8 g9 g10 #> -0.004476128 -0.273074408 -0.546843627 -0.052425391 0.126117155 -0.068209194 #> g11 g12 g13 g14 g15 g16 #> 0.014566453 -0.266544365 0.216863155 0.452080122 0.039498213 -0.226319393 #> g17 rd v g1 g2 g3 #> -0.154162994 0.233695652 0.012674440 -0.073272591 0.041855544 -0.242988981 #> g4 g5 g6 g7 g8 g9 #> -0.097122324 -0.004472159 -0.272832321 -0.546358837 -0.052378914 0.126005349 #> g10 g11 g12 g13 g14 g15 #> -0.068148725 0.014553540 -0.266308067 0.216670901 0.451679342 0.039463197 #> g16 g17 rd v g1 g2 #> -0.226118755 -0.154026324 -0.044168392 0.010666198 -0.072945983 0.041668976 #> g3 g4 g5 g6 g7 g8 #> -0.241905873 -0.096689407 -0.004452225 -0.271616189 -0.543923478 -0.052145439 #> g9 g10 g11 g12 g13 g14 #> 0.125443688 -0.067844956 0.014488668 -0.265121016 0.215705104 0.449666011 #> g15 g16 g17 rd v g1 #> 0.039287292 -0.225110846 -0.153339762 0.029177877 0.002799074 -0.073955255 #> g2 g3 g4 g5 g6 g7 #> 0.042245502 -0.245252853 -0.098027190 -0.004513825 -0.275374237 -0.551449136 #> g8 g9 g10 g11 g12 g13 #> -0.052866917 0.127179312 -0.068783651 0.014689132 -0.268789198 0.218689574 #> g14 g15 g16 g17 rd v #> 0.455887535 0.039830867 -0.228225452 -0.155461352 0.021538462 0.026874999 #> g1 g2 g3 g4 g5 g6 #> -0.073932035 0.042232238 -0.245175851 -0.097996412 -0.004512408 -0.275287777 #> g7 g8 g9 g10 g11 g12 #> -0.551275997 -0.052850318 0.127139381 -0.068762055 0.014684520 -0.268704806 #> g13 g14 g15 g16 g17 rd #> 0.218620911 0.455744399 0.039818361 -0.228153795 -0.155412542 -0.100000000 #> v g1 g2 g3 g4 g5 #> 0.021884290 -0.075299896 0.043013602 -0.249711996 -0.099809502 -0.004595895 #> g6 g7 g8 g9 g10 g11 #> -0.280381041 -0.561475484 -0.053828133 0.129491663 -0.070034263 0.014956207 #> g12 g13 g14 g15 g16 g17 #> -0.273676275 0.222665748 0.464176399 0.040555064 -0.232375005 -0.158287922 #> rd v g1 g2 g3 g4 #> -0.230769231 0.048280513 -0.072906428 0.041646380 -0.241774700 -0.096636977 #> g5 g6 g7 g8 g9 g10 #> -0.004449811 -0.271468905 -0.543628535 -0.052117163 0.125375666 -0.067808167 #> g11 g12 g13 g14 g15 g16 #> 0.014480812 -0.264977254 0.215588138 0.449422179 0.039265989 -0.224988779 #> g17 rd v g1 g2 g3 #> -0.153256613 -0.001311532 0.002252353 -0.073517650 0.041995529 -0.243801653 #> g4 g5 g6 g7 g8 g9 #> -0.097447147 -0.004487116 -0.273744804 -0.548186124 -0.052554095 0.126426771 #> g10 g11 g12 g13 g14 g15 #> -0.068376647 0.014602214 -0.267198730 0.217395553 0.453189975 0.039595181 #> g16 g17 rd v g1 g2 #> -0.226875005 -0.154541462 -0.042424242 0.012991464 -0.074840190 0.042751004 #> g3 g4 g5 g6 g7 g8 #> -0.248187503 -0.099200165 -0.004567837 -0.278669313 -0.558047673 -0.053499512 #> g9 g10 g11 g12 g13 g14 #> 0.128701116 -0.069606703 0.014864899 -0.272005479 0.221306372 0.461342599 #> g15 g16 g17 rd v #> 0.040307475 -0.230956355 -0.157321573 0.152380952 0.036540145
## the function mix.vcov() should be used for dataset