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")
# Outlier and influential detection measures for studies 9, 10, 11, 12
meas <- NMAoutlier.measures(p1)
# Standardized residual for each study included in the network
meas$estand
if (FALSE) {
# Outlier and influential deletion measures for studies 9, 10, 11, 12.
delete <- NMAoutlier.measures(p1, measure = "deletion")
# Standardized deleted residual for studies 9, 10, 11, 12.
delete$estand.deleted
data(smokingcessation)
# Transform data from arm-based to contrast-based format
# We use 'sm' argument for odds ratios.
# We use function pairwise from netmeta package
#
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = smokingcessation, sm = "OR")
# Outlier and influential detection measures for each study in the network
meas <- NMAoutlier.measures(p1, measure = "simple")
# Mahalanobis distance for each study included in the network
meas$Mah
}
Run the code above in your browser using DataLab