metaprop(4:1, c(10, 20, 30, 40))
metaprop(4:1, c(10, 20, 30, 40), sm="PAS")
metaprop(4:1, c(10, 20, 30, 40), sm="PRAW")
metaprop(4:1, c(10, 20, 30, 40), sm="PLN")
metaprop(4:1, c(10, 20, 30, 40), sm="PFT")
forest(metaprop(4:1, c(10, 20, 30, 40)))
m1 <- metaprop(c(0, 0, 10, 10), rep(100, 4))
m2 <- metaprop(c(0, 0, 10, 10), rep(100, 4), incr=0.1)
summary(m1)
summary(m2)
forest(m1)
forest(m2)
## Example from Miller (1978):
death <- c(3, 6, 10, 1)
animals <- c(11, 17, 21, 6)
##
m3 <- metaprop(death, animals, sm="PFT")
forest(m3)
## Data examples from Newcombe (1998)
##
event <- c(81, 15, 0, 1)
n <- c(263, 148, 20, 29)
##
m1 <- metaprop(event, n, sm="PLOGIT", method.ci="SA")
m2 <- update(m1, method.ci="SACC")
m3 <- update(m1, method.ci="WS")
m4 <- update(m1, method.ci="WSCC")
m5 <- update(m1, method.ci="CP")
##
lower <- round(rbind(NA, m1$lower, m2$lower, NA, m3$lower, m4$lower, NA, m5$lower), 4)
upper <- round(rbind(NA, m1$upper, m2$upper, NA, m3$upper, m4$upper, NA, m5$upper), 4)
##
tab1 <- data.frame(
scen1=meta:::p.ci(lower[,1], upper[,1]),
scen2=meta:::p.ci(lower[,2], upper[,2]),
scen3=meta:::p.ci(lower[,3], upper[,3]),
scen4=meta:::p.ci(lower[,4], upper[,4]),
stringsAsFactors=FALSE
)
names(tab1) <- c("r=81, n=263", "r=15, n=148", "r=0, n=20", "r=1, n=29")
row.names(tab1) <- c("Simple", "- SA", "- SACC",
"Score", "- WS", "- WSCC",
"Binomial", "- CP")
tab1[is.na(tab1)] <- ""
##
## Newcombe (1998), Table I, methods 1-5:
##
tab1
## Same confidence interval, i.e. unaffected by choice of summary measure
##
print(metaprop(event, n, sm="PLOGIT", method.ci="WS"), ma=FALSE)
print(metaprop(event, n, sm="PLN", method.ci="WS"), ma=FALSE)
print(metaprop(event, n, sm="PFT", method.ci="WS"), ma=FALSE)
print(metaprop(event, n, sm="PAS", method.ci="WS"), ma=FALSE)
print(metaprop(event, n, sm="PRAW", method.ci="WS"), ma=FALSE)
Run the code above in your browser using DataLab