library(meta)


mean.diff <- c(-10, -5)
lower.diff <- c(-15, -7)
upper.diff <- c(-5, -3)


## Assumptions for CI:
## - 95%-CI
## - normal approximation
##
m1 <- metagen(mean.diff, lower = lower.diff, upper = upper.diff, sm = "MD")
m1


## Assumptions for CI:
## - 95%-CI
## - differences calculated from one sample
##   -> t-distribution with n - 1 degrees of freedom
##
n <- c(20, 30)
m2 <- metagen(mean.diff, lower = lower.diff, upper = upper.diff,
              df = n - 1, sm = "MD")
m2


## Different standard errors:
##
m1$seTE
m2$seTE
