data(dietaryfat)
head(dietaryfat)
# \donttest{
# Transform data from arm-based format to contrast-based format
# Using incidence rate ratios (sm = "IRR") as effect measure.
# Note, the argument 'sm' is not necessary as this is the default
# in R function metainc() called internally
#
pw1 <- pairwise(list(treat1, treat2, treat3),
list(d1, d2, d3), time = list(years1, years2, years3),
studlab = ID, data = dietaryfat, sm = "IRR")
pw1
# Conduct network meta-analysis
#
net1 <- netmeta(pw1)
net1
# Conduct network meta-analysis using incidence rate differences
# (sm = "IRD")
#
pw2 <- pairwise(list(treat1, treat2, treat3),
list(d1, d2, d3), time = list(years1, years2, years3),
studlab = ID, data = dietaryfat, sm = "IRD")
net2 <- netmeta(pw2)
net2
# Draw network graph
#
netgraph(net1, points = TRUE, cex.points = 3, cex = 1.25)
netgraph(net1, points = TRUE, cex.points = 3, cex = 1.25,
labels = c("Control","Diet", "Diet 2"))
# }
Run the code above in your browser using DataLab