knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
options(digits = 2, width = 100)

mscpredmodel

The goal of mscpredmodel is to make external validation and comparison of prediction models via the network meta-analytic approach multiple score comparison (MSC) straightforward for researchers involved in systematic reviews and (network) meta-analysis of prediction models.

Installation

You can install the released version of mscpredmodel from github with:

devtools::install_github("srhaile/mscpredmodel")

Example

This is a basic example which shows you a typical analysis for a dataset having individual patient data for 30 cohorts, each with some combination of scores a, b, c, e, and g. The example here has only 25 bootstrap samples to speed up the runtime, but an actual analysis should use more.

library(mscpredmodel)
library(ggplot2)
theme_set(theme_bw())

dat <- msc_sample_data()
head(dat)

M <- 25
bs.example <- get_bs_samples(data = dat, id = id, cohort = study, 
                             outcome = outcome, n.samples = M, 
                             scores = c("a", "b", "c", "e", "g"), 
                             moderators = c("age", "female"))
ps <- compute_performance(bs.example, fn = oe_ratio, 
                          lbl = "O:E ratio")
summary(ps)
check_transitivity(ps, graph = TRUE)

msc_model(ps, mtype = "consistency")
(modi <- msc_model(ps, mtype = "inconsistency"))

check_homogeneity(modi)
check_consistency(ps)

fullres <- msc_full(ps, ref = "c")
plot(fullres)


srhaile/mscpredmodel documentation built on Sept. 13, 2019, 3:44 p.m.