Skip to content
Prev 241843 / 398500 Next

Breslow-Day test

It's implemented in the metafor package.

Using the example from the pdf that Marc pointed out:

########################################################

library(metafor)

ai <- c(53, 121, 95, 103, 64, 7, 0)
bi <- c(2, 3, 14, 27, 51, 29, 13)
ci <- c(61, 152, 114, 66, 81, 28, 0)
di <- c(1, 5, 7, 12, 40, 101, 64)

res <- rma.mh(ai=ai, bi=bi, ci=ci, di=di)
res
res$BD
res$BDp

########################################################

yields exactly the same results:
Fixed-Effects Model (k = 7)

Test for Heterogeneity:
Q(df = 6) = 3.2892, p-val = 0.7718

Model Results (log scale):

estimate       se     zval     pval    ci.lb    ci.ub
 -0.4238   0.1763  -2.4039   0.0162  -0.7694  -0.0783

Model Results (OR scale):

estimate    ci.lb    ci.ub
  0.6545   0.4633   0.9247

Cochran-Mantel-Haenszel Test:     CMH = 5.4350, df = 1, p-val = 0.0197
Tarone's Test for Heterogeneity:  X^2 = 2.3727, df = 5, p-val = 0.7955
[1] 2.373063
[1] 0.7954786

Best,

--
Wolfgang Viechtbauer
Department of Psychiatry and Neuropsychology
School for Mental Health and Neuroscience
Maastricht University, P.O. Box 616
6200 MD Maastricht, The Netherlands
Web: http://www.wvbauer.com


----Original Message----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Marc Schwartz Sent: Tuesday, November 16, 2010 16:50
To: David Winsemius
Cc: R Help
Subject: Re: [R] Breslow-Day test