if (FALSE) {
library("netmeta")
data(smokingcessation)
smokingcessation$id <- 1:nrow(smokingcessation)
study912 <- subset(smokingcessation, id %in% 9:12)
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = study912, sm = "OR")
# Forward search algorithm
#
FSresult <- NMAoutlier(p1, P = 1, small.values = "bad", n_cores = 2)
# forward plot for Cook's distance
fwdplot(FSresult, "cook")
data(smokingcessation)
# Transform data from arm-based to contrast-based format
# Use 'sm' argument for odds ratios.
# Use function pairwise from netmeta package
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = smokingcessation, sm = "OR")
# Forward Search algorithm
FSresult <- NMAoutlier(p1, small.values = "bad")
FSresult
# forward plot for Cook's distance
fwdplot(FSresult, "cook")
# forward plot for ratio of variances
fwdplot(FSresult, "ratio")
# forward plot for heterogeneity estimator
fwdplot(FSresult, "heterog")
# forward plot for Q statistics
fwdplot(FSresult, "Q")
# forward plot for P-scores
fwdplot(FSresult, "pscore")
# forward plot monitoring P-scores for treatment A
fwdplot(FSresult,"pscore", "A")
# forward plot for z-values of disagreement of direct and indirect evidence
fwdplot(FSresult, "nsplit")
# forward plot for z-values of disagreement of direct and indirect evidence
# monitoring treatment comparison A versus B
fwdplot(FSresult, "nsplit", "A:B")
# forward plot for standardized residual for study 4
fwdplot(FSresult, "estand", 4)
}
Run the code above in your browser using DataLab