Package 'DiagProgMeta'

Title: Diagnostic and Prognostic Meta-Analysis with Sensitivity Analysis
Description: Provides methods for meta-analysis of diagnostic test accuracy and prognostic studies. The package estimates the summary receiver operating characteristic (SROC) curve for diagnostic test accuracy and the time-dependent SROC curve for prognostic studies. It also provides likelihood-based sensitivity analyses to assess the potential impact of publication bias on these curves. The methods are described in Hattori and Zhou (2016) <doi:10.1002/sim.7029>, Reitsma et al. (2005) <doi:10.1016/j.jclinepi.2005.02.022>, Zhou et al. (2023) <doi:10.1002/sim.9643>, and Zhou et al. (2025) <doi:10.1017/rsm.2025.14>.
Authors: Ryota Kinugawa [aut, ctb], Kota Nakaike [aut, ctb], Yamato Hashimoto [aut, ctb], Yi Zhou [aut, cre] (ORCID: <https://orcid.org/0000-0001-9254-3245>)
Maintainer: Yi Zhou <[email protected]>
License: GPL (>= 3)
Version: 0.1.1
Built: 2026-12-03 20:14:30 UTC
Source: https://github.com/cran/DiagProgMeta

Help Index


Diagnostic and Prognostic Meta-Analysis with Sensitivity Analysis

Description

This package implements the meta-analysis of diagnostic test accuracy (DTA) studies and prognostic studies by the summary receiver operating characteristic (SROC) curve and the area under the SROC curve (SAUC), together with the likelihood-based sensitivity analysis for publication bias.

  • Diagnostic studies: the bivariate random-effects model of the logit-transformed sensitivity and specificity (Reitsma et al., 2005) doi:10.1016/j.jclinepi.2005.02.022, and the sensitivity analysis for publication bias on the SROC curve and SAUC (Zhou et al., 2023) doi:10.1002/sim.9643.

  • Prognostic studies: the time-dependent SROC curve and SAUC, where the time-dependent sensitivity and specificity are reconstructed from the published survival probabilities (Hattori and Zhou, 2016) doi:10.1002/sim.7029 and the sensitivity analysis for publication bias on the time-dependent SROC curve and SAUC (Zhou et al., 2025) doi:10.1017/rsm.2025.14.

Fitting functions

Without publication bias Sensitivity analysis for publication bias
Diagnostic studies (SROC) reitsma.sroc srocsa.t
Prognostic studies (time-dependent SROC) hattori.tsroc tsrocsa.lrt

sauc calculates the SAUC and its confidence interval.

Methods for the results

For the time-dependent results, the plot methods draw one plot for each time point (press <Return> for the next in an interactive session), or all the time points in one panel (overlay = TRUE).

Example data

  • IVD, CD64: meta-analyses of diagnostic studies.

  • Ki67: meta-analysis of Ki-67 as a prognostic marker in early breast cancer.

Author(s)

Maintainer: Yi Zhou [email protected] (ORCID)

Authors:

  • Yi Zhou [email protected] (ORCID)

  • Ryota Kinugawa [contributor]

  • Kota Nakaike [contributor]

  • Yamato Hashimoto [contributor]

References

Hattori S, Zhou XH (2016). Time-dependent summary receiver operating characteristics for meta-analysis of prognostic studies. Statistics in Medicine, 35(26), 4746–4763. doi:10.1002/sim.7029

Reitsma JB, Glas AS, Rutjes AW, Scholten RJ, Bossuyt PM, Zwinderman AH (2005). Bivariate analysis of sensitivity and specificity produces informative summary measures in diagnostic reviews. Journal of Clinical Epidemiology, 58(10), 982–990. doi:10.1016/j.jclinepi.2005.02.022

Zhou Y, Huang A, Hattori S (2023). A likelihood-based sensitivity analysis for publication bias on the summary receiver operating characteristic in meta-analysis of diagnostic test accuracy. Statistics in Medicine, 42(6), 781–798. doi:10.1002/sim.9643

Zhou Y, Huang A, Hattori S (2025). Sensitivity analysis for reporting bias on the time-dependent summary receiver operating characteristics curve in meta-analysis of prognosis studies with time-to-event outcomes. Research Synthesis Methods, 16(3), 528–549. doi:10.1017/rsm.2025.14

See Also

Useful links:


Meta-analysis of diagnostic studies: CD64 data

Description

A dataset from a meta-analysis of diagnostic studies evaluating neutrophil CD64 expression for the early diagnosis of bacterial infection. The dataset contains study-level 2 x 2 diagnostic accuracy data together with information on cutoff values, measurement units, and subgroups.

Usage

CD64

Format

A data frame with 27 rows (studies) and 11 variables:

study

Study identifier.

Author

Author or authors of the study.

TP

Number of true positive cases.

FN

Number of false negative cases.

FP

Number of false positive cases.

TN

Number of true negative cases.

cutoff

Diagnostic cutoff value used in the study.

unit

Measurement unit of the cutoff value.

unit.grp

Measurement-unit group used in the study.

cutoff.grp

Cutoff-value group used in the study.

subgroup

Subgroup of the study used for analysis.

Source

Li S, Huang X, Chen Z, Zhong H, Peng Q, Deng Y, Qin X, Zhao J (2013). Neutrophil CD64 expression as a biomarker in the early diagnosis of bacterial infection: A meta-analysis. International Journal of Infectious Diseases, 17(1), e12–e23. doi:10.1016/j.ijid.2012.07.017

Examples

data(CD64)

Bivariate random-effects model (Hattori's model) estimating the time-dependent SROC curve without publication bias

Description

This function estimates the time-dependent SROC curve and SAUC in meta-analysis of prognostic studies, without considering publication bias. At each time point, the time-dependent sensitivity and specificity are reconstructed from the published survival probabilities of the test-positive and test-negative groups, and the bivariate random-effects model of the logit-transformed sensitivity and specificity (with the within-study covariance) is fitted by the maximum likelihood method.

Usage

hattori.tsroc(
  time.points,
  study.os,
  time.os,
  n1.os,
  n0.os,
  s1.os,
  s0.os,
  data.os = NULL,
  study.lnhr,
  lnhr,
  var.lnHR,
  data.lnhr = NULL,
  time.med,
  n1.med,
  n0.med,
  s1.med,
  s0.med,
  data.mt = NULL,
  ci.level = 0.95,
  parallel.ncores = 1L,
  parset = list()
)

Arguments

time.points

A numeric vector of the time points at which the time-dependent SROC curve is estimated. Each value should be included in time.os.

study.os

Specify the column of the study ID (numeric) in data.os.

time.os

Specify the column of the time at which the survival probabilities are reported. The unit of time should be the same as time.points and time.med.

n1.os

Specify the column of the number of subjects in the test-positive group (group 1).

n0.os

Specify the column of the number of subjects in the test-negative group (group 0).

s1.os

Specify the column of the survival probability at time.os in group 1.

s0.os

Specify the column of the survival probability at time.os in group 0.

data.os

A data frame of the survival data, with one row for each study and each time point. Within each study, the rows should be sorted in ascending order of time. If data.os = NULL (default), study.os, time.os, n1.os, n0.os, s1.os, and s0.os are evaluated in the calling environment.

study.lnhr

Specify the column of the study ID (numeric) in data.lnhr, which corresponds to study.os.

lnhr

Specify the column of lnHR (group 1 versus group 0).

var.lnHR

Specify the column of the variance of lnHR.

data.lnhr

A data frame of lnHR, with one row for each study. If data.lnhr = NULL (default), study.lnhr, lnhr, and var.lnHR are evaluated in the calling environment.

time.med

Specify the column of the median follow-up time.

n1.med

Specify the column of the number of subjects in group 1.

n0.med

Specify the column of the number of subjects in group 0.

s1.med

Specify the column of the survival probability at time.med in group 1.

s0.med

Specify the column of the survival probability at time.med in group 0.

data.mt

A data frame of the median follow-up time, with one row for each study reporting it. It is used to estimate the censoring distribution common to all the studies (see details in tsrocsa.lrt). If data.mt = NULL (default), time.med, n1.med, n0.med, s1.med, and s0.med are evaluated in the calling environment.

ci.level

The confidence level of the confidence intervals, within (0, 1). The default is 0.95.

parallel.ncores

The number of cores used for the parallel computation over time.points (PSOCK cluster of the package parallel). The default is 1L (no parallel computation).

parset

A list of the settings for the estimation, which updates the default settings. Bad initial values and bounds may cause non-convergence.

  • inital.values: The initial values of c(mu1, mu2, tau1, tau2, rho). If it is not a vector of length 5 (default), the estimates by mixmeta are used.

  • mu.bound: μ1\mu_1 and μ2\mu_2 are searched within [-mu.bound, mu.bound]. The default is 5.

  • tau.bound: τ1\tau_1 and τ2\tau_2 are searched within [eps, tau.bound]. The default is 5.

  • eps: The lower bound of τ1\tau_1 and τ2\tau_2. The default is 1e-5.

Details

The time-dependent sensitivity and specificity, and their within-study variances and covariance are calculated in the same way as tsrocsa.lrt. study.lnhr, lnhr, and var.lnHR are required as input, but lnHR is not used in the estimation of this function.

Value

An object of class "sroc": a list with one element for each time point (named "t = xx"). Each element is the same as the output of reitsma.sroc (its data element also contains the within-study covariance v12), or an object of class "try-error" if the estimation failed at that time point. The attributes "call", "ci.level", and "n.study" (the number of studies at each time point) are used by the methods. The results can be shown by print.sroc, summary.sroc, and plot.sroc.

References

Hattori, S., & Zhou, X.-H. (2016). Time-dependent summary receiver operating characteristics for meta-analysis of prognostic studies. Statistics in Medicine, 35(26), 4746–4763. doi:10.1002/sim.7029

See Also

print.sroc, summary.sroc, plot.sroc, reitsma.sroc, tsrocsa.lrt

Examples

## load data
data(Ki67)
head(Ki67$OS)
head(Ki67$HR)
head(Ki67$MT)

## Define datasets of the HR
Ki67_OS <- Ki67$OS
Ki67_HR <- Ki67$HR
Ki67_MT <- Ki67$MT

## lnHR and its variance from HR and its 95 percent CI
Ki67_HR$lnHR   <- log(Ki67_HR$HR)
Ki67_HR$lnHR.var <- ((log(Ki67_HR$ci.up) - log(Ki67_HR$ci.low)) / (2 * qnorm(0.975)))^2

fit <- hattori.tsroc(
  time.points = c(24, 36, 60),
  study.os = study,
  time.os = t, n1.os = n1, n0.os = n0,
  s1.os = s1, s0.os = s0,
  data.os = Ki67_OS,
  study.lnhr = study, lnhr = lnHR, var.lnHR = lnHR.var,
  data.lnhr = Ki67_HR,
  time.med = mct_mo, n1.med = n1, n0.med = n0,
  s1.med = s1_mct, s0.med = s0_mct,
  data.mt = Ki67_MT
)

## main results: one row for each time point
fit

## estimates with SEs and confidence intervals at each time point
print(fit)
summary(fit)

## plots
plot(fit, ask = FALSE)                       # all time points, one per page, no prompt
plot(fit, time = 36, add.study = TRUE)       # one time point with the studies
plot(fit, overlay = TRUE)                    # all time points in one panel


## interactive: press <Return> to move to the next time point
if (interactive()) plot(fit, add.study = TRUE, study.size = "precision")


## Using paralell computing

fitp <- hattori.tsroc(
  time.points = c(24, 36, 60),
  study.os = study,
  time.os = t, n1.os = n1, n0.os = n0,
  s1.os = s1, s0.os = s0,
  data.os = Ki67_OS,
  study.lnhr = study, lnhr = lnHR, var.lnHR = lnHR.var,
  data.lnhr = Ki67_HR,
  time.med = mct_mo, n1.med = n1, n0.med = n0,
  s1.med = s1_mct, s0.med = s0_mct,
  data.mt = Ki67_MT,
  parallel.ncores = 2L)
print(fitp)

Meta-analysis of diagnostic studies: IVD data

Description

A dataset from a meta-analysis of diagnostic studies evaluating methods for diagnosing intravascular device-related bloodstream infection (IVD-BSI). The dataset contains study-level 2 x 2 diagnostic accuracy data together with information on diagnostic type and cutoff values.

Usage

IVD

Format

A data frame with 33 rows (studies) and 8 variables:

study

Study identifier.

TP

Number of true positive cases.

FN

Number of false negative cases.

FP

Number of false positive cases.

TN

Number of true negative cases.

cutoff.grp

Cutoff-value group used in the study.

type

Type of diagnostic method or test.

cutoff

Diagnostic cutoff value or cutoff information.

Source

Safdar N, Fine JP, Maki DG (2005). Meta-analysis: methods for diagnosing intravascular device-related bloodstream infection. Annals of Internal Medicine, 142(6), 451–466. doi:10.7326/0003-4819-142-6-200503150-00011

Examples

data(IVD)

Meta-analysis of prognostic studies: Ki-67 data

Description

A dataset from a meta-analysis of prognostic studies evaluating the prognostic value of Ki-67 expression in early breast cancer. The dataset contains study-level overall survival, hazard-ratio, and median survival-time data.

Usage

Ki67

Format

A list of 3 datasets:

OS

Dataset containing overall survival data. It includes author (study author), study (study identifier), t (follow-up time in month), n1 and n0 (sample sizes in the two comparison groups), and s1 and s0 (survival probabilities in the two groups).

HR

Dataset containing hazard-ratio data. It includes author (study author), study (study identifier), HR (hazard ratio), and ci.low and ci.up (lower and upper confidence limits of the hazard ratio).

mct

Dataset containing median follow-up time data. It includes author (study author), study (study identifier), n1 and n0 (sample sizes in the two comparison groups), mct_mo (median follow-up time in months), s1_mct and s0_mct (survival probabilities at median follow-up time in the two comparison groups).

Source

de Azambuja E, Cardoso F, de Castro G, Colozza M, Mano MS, Durbecq V, Sotiriou C, Larsimont D, Piccart-Gebhart MJ, Paesmans M (2007). Ki-67 as prognostic marker in early breast cancer: a meta-analysis of published studies involving 12 155 patients. British Journal of Cancer, 96(10), 1504–1513. doi:10.1038/sj.bjc.6603756

Examples

data(Ki67)

# Overall survival data
head(Ki67$OD)

# Hazard-ratio data
head(Ki67$HR)

# Median follow-up time data
head(Ki67$MT)

Plot the SROC curves

Description

Plot method for objects of class "sroc" returned by reitsma.sroc (one SROC curve) and hattori.tsroc (one time-dependent SROC curve for each time point). For the output of hattori.tsroc, the curves of the time points are drawn one per page by default; in an interactive session the user is prompted ("Hit <Return> to see next plot") before each new page. Alternatively, all the time points can be overlaid in one panel (overlay = TRUE).

Usage

## S3 method for class 'sroc'
plot(
  x,
  time = NULL,
  time.index = FALSE,
  overlay = FALSE,
  ask = NULL,
  add.spoint = TRUE,
  spoint.region = FALSE,
  plot.ci = FALSE,
  ci.level = 0.95,
  add.study = FALSE,
  study.size = c("fixed", "precision"),
  study.pch = 1,
  study.cex = 1,
  study.col = NULL,
  add.sauc = TRUE,
  legend.pos = "bottomright",
  sroc.cols = NULL,
  sroc.lty = 1,
  sroc.lwd = 2,
  ci.lty = 2,
  ci.lwd = 1,
  sp.pch = 19,
  sp.cex = 1.2,
  xlab = "FPR (1 - specificity)",
  ylab = "TPR (sensitivity)",
  main = NULL,
  addon = FALSE,
  n.grid = 300,
  ...
)

Arguments

x

An object of class "sroc" from reitsma.sroc or hattori.tsroc.

time

Time points to plot (only for hattori.tsroc results). Either numeric values of the time points (e.g., c(24, 60)) or integer indices when time.index = TRUE. Default NULL plots all the time points.

time.index

Logical; if TRUE, time is interpreted as the positions of the time points.

overlay

Logical; if TRUE, all the selected time points are drawn in one panel.

ask

Logical; whether to wait for <Return> before each new page. Default NULL means TRUE when more than one page is drawn on an interactive device.

add.spoint

Logical; whether to add the summary operating point.

spoint.region

Logical; whether to add the confidence region of the summary point (an ellipse on the logit scale, back-transformed).

plot.ci

Logical; whether to add pointwise confidence bands of the SROC curve (delta method using var.ml).

ci.level

Confidence level of the bands and the region. Default 0.95.

add.study

Logical; whether to add the observed studies ((1−speci,sensi)(1 - \mathrm{spec}_i, \mathrm{sens}_i), after continuity correction) stored in the data element of the fit.

study.size

Size of the study points: "fixed" (default) or "precision", proportional to 1/v1+v21/\sqrt{v_1 + v_2} relative to its mean.

study.pch, study.cex

Symbol and (base) size of the study points.

study.col

Color of the study points. Default NULL uses the curve color, semi-transparent.

add.sauc

Logical; whether to show the SAUC (and its CI) in a legend.

legend.pos

Position of the legend (see legend).

sroc.cols

Color(s) of the SROC curves. Recycled over time points when overlay = TRUE.

sroc.lty, sroc.lwd

Line type and width of the SROC curves.

ci.lty, ci.lwd

Line type and width of the confidence bands.

sp.pch, sp.cex

Symbol and size of the summary points.

xlab, ylab

Axis labels.

main

Main title. Default NULL gives an automatic title (with the time point).

addon

Logical; if TRUE, add to the current plot instead of starting a new one (only when one panel is drawn).

n.grid

Number of grid points to draw each curve.

...

Other graphical arguments passed to plot.default.

Value

Invisibly, a list (one element per drawn fit) of data frames with the curve coordinates (fpr, tpr, and lb, ub when plot.ci = TRUE).

Examples

data(IVD)
fit1 <- reitsma.sroc(TP = TP, FN = FN, FP = FP, TN = TN, data = IVD)
plot(fit1, plot.ci = TRUE, spoint.region = TRUE)
plot(fit1, add.study = TRUE)                             # add the studies
plot(fit1, add.study = TRUE, study.size = "precision")   # point size by precision

## time-dependent SROC curves
data(Ki67)
Ki67_HR <- Ki67$HR
Ki67_HR$lnHR     <- log(Ki67_HR$HR)
Ki67_HR$lnHR.var <- ((log(Ki67_HR$ci.up) - log(Ki67_HR$ci.low)) / (2 * qnorm(0.975)))^2
fit2 <- hattori.tsroc(
  time.points = c(24, 36, 60),
  study.os = study,
  time.os = t, n1.os = n1, n0.os = n0,
  s1.os = s1, s0.os = s0,
  data.os = Ki67$OS,
  study.lnhr = study, lnhr = lnHR, var.lnHR = lnHR.var,
  data.lnhr = Ki67_HR,
  time.med = mct_mo, n1.med = n1, n0.med = n0,
  s1.med = s1_mct, s0.med = s0_mct,
  data.mt = Ki67$MT
)
plot(fit2, ask = FALSE)             # one page per time point, no prompt
plot(fit2, time = 36)               # a single time point
plot(fit2, overlay = TRUE)          # all time points in one panel

Plot the sensitivity analysis of the SROC curves

Description

Plot method for 'srocsa' objects. This function plots the SROC curves and the summary points for each marginal selection probability pp, from the sensitivity analysis by srocsa.t or tsrocsa.lrt. For srocsa.t, one plot is created. For tsrocsa.lrt, one plot is created at each time point, with the title time = xx; in an interactive session the user is prompted ("Hit <Return> to see next plot") before each new time point. The same pp has the same color and line type at all the time points. Alternatively, all the time points can be overlaid in one panel (overlay = TRUE): the color indicates the time point and the line type indicates pp.

Usage

## S3 method for class 'srocsa'
plot(
  x,
  time = NULL,
  p = NULL,
  overlay = FALSE,
  ask = NULL,
  sroc.cols = NULL,
  sroc.lty = 1,
  sroc.lwd = 2,
  add.spoint = TRUE,
  sp.pch = 19,
  sp.cex = 1.2,
  plot.ci = FALSE,
  spoint.region = FALSE,
  ci.level = 0.95,
  ci.lty = 2,
  ci.lwd = 1,
  add.study = FALSE,
  study.size = c("fixed", "precision"),
  study.pch = 1,
  study.cex = 1,
  study.col = NULL,
  add.sauc = TRUE,
  legend.pos = "bottomright",
  legend.cex = 0.85,
  main = NULL,
  xlab = "FPR (1 - specificity)",
  ylab = "TPR (sensitivity)",
  n.grid = 300,
  ...
)

Arguments

x

A fitted object returned by the function srocsa.t or tsrocsa.lrt.

time

Time points to plot (only for the results from tsrocsa.lrt). If time = NULL (default), all the time points are plotted.

p

Values of the marginal selection probability pp to plot. If p = NULL (default), all the values are plotted.

overlay

Logical; if TRUE, all the selected time points of tsrocsa.lrt are drawn in one panel (ignored for srocsa.t, which has one panel).

ask

Logical; whether to wait for <Return> before each new time point. Default NULL means TRUE when more than one plot is drawn on an interactive device.

sroc.cols

Colors of the SROC curves: one for each pp, or one for each time point when overlay = TRUE. Default uses grey colors (black for the first pp), and hcl.colors (palette "Dark 3") for the time points when overlay = TRUE.

sroc.lty

Line types of the SROC curves, recycled over pp. When overlay = TRUE and it is not specified, 1, 2, 3, ... are used for the values of pp.

sroc.lwd

Line width of the SROC curves.

add.spoint

Whether to add the summary points on the SROC curves.

sp.pch

Type of the summary points.

sp.cex

Size of the summary points.

plot.ci

Whether to add the pointwise confidence bands of the SROC curves (delta method using var.ml).

spoint.region

Whether to add the confidence regions of the summary points.

ci.level

Confidence level of the bands and regions. Default 0.95.

ci.lty, ci.lwd

Line type and width of the bands and regions.

add.study

Whether to add the observed (published) studies ((1−speci,sensi)(1 - \mathrm{spec}_i, \mathrm{sens}_i), after continuity correction), stored in the attribute "data" of x.

study.size

Size of the study points: "fixed" (default) or "precision", proportional to 1/v1+v21/\sqrt{v_1 + v_2} relative to its mean.

study.pch, study.cex

Symbol and (base) size of the study points.

study.col

Color of the study points. Default NULL uses grey, or the (semi-transparent) color of each time point when overlay = TRUE.

add.sauc

Whether to show the SAUC (and its CI) for each pp in the legend.

legend.pos

Position of the legend. See legend. NULL suppresses the legend.

legend.cex

Size of the legend text.

main

Title of the plot. If main = NULL (default), time = xx is used for the time-dependent results ("Time-dependent SROC curves" when overlay = TRUE), and no title for the results from srocsa.t.

xlab

Label of x-axis.

ylab

Label of y-axis.

n.grid

Number of grid points to draw each curve.

...

Other arguments in function plot.default.

Details

For p<1p < 1 in tsrocsa.lrt, the SROC curve is calculated from (μ1,μ2,τ1,τ2,ρ1)(\mu_1, \mu_2, \tau_1, \tau_2, \rho_1) of the trivariate model, i.e., the parameters of the logit-transformed sensitivity and specificity.

Value

x, invisibly. Called for the side effect of plotting.

See Also

srocsa.t, tsrocsa.lrt, plot.sroc

Examples

## load data
data(IVD)

fit1 <- srocsa.t(TP = TP, FN = FN, TN = TN, FP = FP, data = IVD, sa.p = c(1, 0.8, 0.6))
plot(fit1)

## set the colors and add the studies
plot(fit1, sroc.cols = c("black", "blue", "red"), add.study = TRUE)

## only p = 1 and p = 0.6, with confidence bands
plot(fit1, p = c(1, 0.6), plot.ci = TRUE, sroc.cols = c("black", "red"))


## time-dependent results
data(Ki67)
Ki67_HR <- Ki67$HR
Ki67_HR$lnHR     <- log(Ki67_HR$HR)
Ki67_HR$lnHR.var <- ((log(Ki67_HR$ci.up) - log(Ki67_HR$ci.low)) / (2 * qnorm(0.975)))^2
fit2 <- tsrocsa.lrt(
  time.points = c(36, 60),
  study.os = study,
  time.os = t, n1.os = n1, n0.os = n0,
  s1.os = s1, s0.os = s0,
  data.os = Ki67$OS,
  study.lnhr = study, lnhr = lnHR, var.lnHR = lnHR.var,
  data.lnhr = Ki67_HR,
  time.med = mct_mo, n1.med = n1, n0.med = n0,
  s1.med = s1_mct, s0.med = s0_mct,
  data.mt = Ki67$MT,
  senp.p = c(1, 0.8)
)
plot(fit2, ask = FALSE)              # one plot per time point, no prompt
plot(fit2, time = 60)                # one time point
plot(fit2, overlay = TRUE)           # all time points in one panel (color: time, line type: p)
plot(fit2, overlay = TRUE, p = 0.8)  # all time points for one p

Print method for 'sroc' objects

Description

This function prints the main results of reitsma.sroc (SROC curve) and hattori.tsroc (time-dependent SROC curve; one row for each time point), without considering publication bias: the number of studies, convergence of the optimizer, the SAUC, the summary sensitivity and specificity with their confidence intervals, and the estimates of (μ1,μ2,τ1,τ2,ρ)(\mu_1, \mu_2, \tau_1, \tau_2, \rho).

Usage

## S3 method for class 'sroc'
print(x, digits = 3, ...)

Arguments

x

A fitted object returned by the function reitsma.sroc or hattori.tsroc.

digits

The number of decimal places of the results.

...

Other arguments in function print.default.

Details

Conv

"yes" indicates that nlminb converged (convergence = 0).

SAUC

The confidence interval is sauc.ci of the fitted object (calculated on the logit scale; see sauc).

Sens, Spec

plogis(μ1)\mathrm{plogis}(\mu_1) and plogis(μ2)\mathrm{plogis}(\mu_2); the confidence intervals are the Wald intervals of μ1\mu_1 and μ2\mu_2, back-transformed.

tau1, tau2, rho

Between-study standard deviations (not variances) and correlation of the logit-transformed sensitivity and specificity.

See summary.sroc for the standard errors and confidence intervals of all the parameters.

Value

x, invisibly. Called for the side effect of printing.

See Also

reitsma.sroc, hattori.tsroc, summary.sroc, plot.sroc

Examples

## load data
data(IVD)

fit <- reitsma.sroc(TP = TP, FN = FN, FP = FP, TN = TN, data = IVD)
fit
print(fit, digits = 4)

Print method for 'srocsa' objects

Description

This function prints the main results: convergence of the optimizer, SAUC estimates, and parameter estimates with standard errors (SE) for each marginal selection probability pp. For the time-dependent results, the results are printed at each time point.

Usage

## S3 method for class 'srocsa'
print(x, digits = 3, ...)

Arguments

x

A fitted object returned by the function srocsa.t, tsroc, or tsrocsa.lrt.

digits

The digits of the results

...

Other arguments in function print.default

Details

Optimizer

1 indicates that nlminb converged (convergence = 0).

SAUC

The SE is calculated by the delta method. The confidence interval is calculated on the logit scale, so it is not symmetric around the SAUC.

tau_se, tau_sp

Between-study standard deviations (not variances).

beta, alpha

"-" indicates not applicable (p=1p = 1, or the model without selection). The SE of alpha is not available.

Results from tsroc

Shown as p=1p = 1, because tsroc fits the model without selection.

Value

Print the main results of a srocsa object

See Also

srocsa.t, hattori.tsroc, tsrocsa.lrt, summary.srocsa, plot.srocsa

Examples

## load data
data(IVD)

## print the results
fit1 <- srocsa.t(TP = TP, FN = FN, TN = TN, FP = FP, data = IVD, sa.p = c(1, 0.8, 0.6))
print(fit1)

fit2 <- srocsa.t(TP = TP, FN = FN, TN = TN, FP = FP, data = IVD, sa.p = c(1, 0.8, 0.6), c11 = 0.5)
print(fit2, digits = 4)

Print the summary of 'sroc' objects

Description

Print the summary of the results of reitsma.sroc or hattori.tsroc; see summary.sroc. For hattori.tsroc, the results are printed for each time point.

Usage

## S3 method for class 'summary.sroc'
print(x, digits = 3, ...)

Arguments

x

An object returned by the function summary.sroc.

digits

The number of decimal places of the results.

...

Other arguments in function print.default.

Value

x, invisibly. Called for the side effect of printing.

See Also

summary.sroc


Print the summary of 'srocsa'

Description

Print the summary of 'srocsa': the main results (see print.srocsa) and the estimates of all the parameters (par.all) of the fitted models.

Usage

## S3 method for class 'summary.srocsa'
print(x, digits = 3, ...)

Arguments

x

An object returned by the function summary.srocsa.

digits

The digits of the results

...

Other arguments in function print.default

Value

Print the summary of a srocsa object


Bivariate random-effects model (Reitsma's model) estimating the SROC curve without publication bias

Description

This function fits the bivariate random-effects model of the logit-transformed sensitivity and specificity (Reitsma et al., 2005) by the maximum likelihood method, and calculates the SAUC and its confidence interval. Publication bias is not considered.

Usage

reitsma.sroc(
  TP,
  FN,
  FP,
  TN,
  data = NULL,
  cc.value = 0.5,
  cc.type = c("single", "all"),
  ci.level = 0.95,
  parset = list()
)

Arguments

TP

Specify the column of true positives (TP).

FN

Specify the column of false negatives (FN).

FP

Specify the column of false positives (FP).

TN

Specify the column of true negatives (TN).

data

A data frame containing the columns of TP, FN, FP, and TN. One row corresponds to one study. If data = NULL (default), TP, FN, FP, and TN are evaluated in the calling environment (e.g., numeric vectors).

cc.value

Value added to the cells for the “continuity correction”, within (0, 1]. The default is 0.5.

cc.type

Type of the “continuity correction” (c("single", "all")). The default is "single". "single": cc.value is added to all the cells of the studies with at least one zero cell. "all": cc.value is added to all the cells of all the studies if at least one study has a zero cell.

ci.level

The confidence level of the confidence intervals, within (0, 1). The default is 0.95.

parset

A list of the settings for the estimation, which updates the default settings. Bad initial values and bounds may cause non-convergence.

  • inital.values: The initial values of c(mu1, mu2, tau1, tau2, rho). The default is c(0.1, 0.1, 0.1, 0.1, -0.1). If it is NULL or not a vector of length 5, the estimates by mixmeta are used.

  • mu.bound: μ1\mu_1 and μ2\mu_2 are searched within [-mu.bound, mu.bound]. The default is 5.

  • tau.bound: τ1\tau_1 and τ2\tau_2 are searched within [eps, tau.bound]. The default is 5.

  • eps: The lower bound of τ1\tau_1 and τ2\tau_2. The default is 1e-5.

Details

Bivariate model

See details in srocsa.t.

SAUC

See sauc.

Continuity correction

https://en.wikipedia.org/wiki/Continuity_correction

Value

An object of class "sroc": the output of nlminb (par is (mu1, mu2, tau1, tau2, rho); tau1 and tau2 are standard deviations) with the following additional elements. If nlminb failed, an object of class "try-error".

var.ml

The inverse of the numerical Hessian matrix of the negative log-likelihood.

sauc.ci

SAUC and its confidence interval.

mu1.ci, mu2.ci

The estimates and confidence intervals of μ1\mu_1 and μ2\mu_2, and of the sensitivity and specificity.

par.all

All the estimates: mu1, mu2, tau1^2, tau2^2, tau12, sauc, sens, spec.

data

A data frame of the study-level logit-transformed sensitivity (y1) and specificity (y2) and their within-study variances (v1, v2), used by plot.sroc to add the studies (add.study = TRUE).

The call and ci.level are kept in the attributes "call" and "ci.level". The results can be shown by print.sroc, summary.sroc, and plot.sroc.

References

Reitsma JB, Glas AS, Rutjes AW, Scholten RJ, Bossuyt PM, Zwinderman AH (2005). Bivariate analysis of sensitivity and specificity produces informative summary measures in diagnostic reviews. Journal of Clinical Epidemiology, 58(10), 982–990. doi:10.1016/j.jclinepi.2005.02.022

See Also

print.sroc, summary.sroc, plot.sroc, sauc, srocsa.t

Examples

## load data
data(IVD)

fit <- reitsma.sroc(TP = TP, FN = FN, FP = FP, TN = TN, data = IVD)

## main results
fit

## estimates with SEs and confidence intervals
print(fit)
summary(fit)

## elements of the fitted model
fit$par.all
fit$sauc.ci

## SROC curve with the summary point
plot(fit)

## add the pointwise confidence band and the confidence region of the summary point
plot(fit, plot.ci = TRUE, spoint.region = TRUE)

plot(fit, add.study = TRUE)                              # studies as open circles
plot(fit, add.study = TRUE, study.size = "precision")    # size is proportional to 1/sqrt(v1 + v2)

SAUC and its confidence interval

Description

This function calculates the area under the SROC curve (SAUC) of the bivariate random-effects model, and its confidence interval when the variance-covariance matrix of the estimates is given.

Usage

sauc(mu1, mu2, tau1, tau2, rho, var.matrix = NULL, ci.level)

Arguments

mu1

The mean of the logit-transformed sensitivity.

mu2

The mean of the logit-transformed specificity.

tau1

The between-study standard deviation of the logit-transformed sensitivity.

tau2

The between-study standard deviation of the logit-transformed specificity.

rho

The between-study correlation of the logit-transformed sensitivity and specificity.

var.matrix

The 5 x 5 variance-covariance matrix of the estimates of (mu1, mu2, tau1, tau2, rho) in this order, such as var.ml in the output of reitsma.sroc. If var.matrix = NULL (default), the confidence interval is not calculated.

ci.level

The confidence level of the confidence interval, within (0, 1). It is required when var.matrix is given.

Details

SROC curve

The SROC curve is Se=logit−1(μ1−(ρτ1/τ2)(logit(x)+μ2))\mathrm{Se} = \mathrm{logit}^{-1}(\mu_1 - (\rho \tau_1 / \tau_2) (\mathrm{logit}(x) + \mu_2)), where xx is the false positive rate (1 - specificity). SAUC is its integral over x∈(0,1)x \in (0, 1) by integrate.

Confidence interval

The standard error of SAUC is calculated by the delta method. The confidence interval is calculated on the logit scale and back-transformed, so it is not symmetric around SAUC.

Value

A named numeric vector of sauc, sauc.lb, and sauc.ub (SAUC and the lower and upper bounds of its confidence interval). sauc.lb and sauc.ub are NA if var.matrix = NULL, and sauc is NA if the integration failed.

See Also

reitsma.sroc, srocsa.t

Examples

## SAUC without confidence interval
sauc(mu1 = 1.5, mu2 = 2, tau1 = 0.8, tau2 = 0.9, rho = -0.3)

## SAUC with confidence interval from the fitted model
data(IVD)
fit <- reitsma.sroc(TP = TP, FN = FN, FP = FP, TN = TN, data = IVD)
est <- fit$par
sauc(mu1 = est[1], mu2 = est[2], tau1 = est[3], tau2 = est[4], rho = est[5],
     var.matrix = fit$var.ml, ci.level = 0.95)

Bivariate random-effects model for the SROC curve without publication bias

Description

This function fits the bivariate random-effects model of the logit-transformed sensitivity and specificity (Reitsma et al., 2005) by the maximum likelihood method, and calculates the SAUC and its confidence interval. Publication bias is not considered.

Usage

sroc(
  TP,
  FN,
  FP,
  TN,
  data = NULL,
  cc.value = 0.5,
  cc.type = c("single", "all"),
  ci.level = 0.95,
  parset = list()
)

Arguments

TP

Specify the column of true positives (TP).

FN

Specify the column of false negatives (FN).

FP

Specify the column of false positives (FP).

TN

Specify the column of true negatives (TN).

data

A data frame containing the columns of TP, FN, FP, and TN. One row corresponds to one study. If data = NULL (default), TP, FN, FP, and TN are evaluated in the calling environment (e.g., numeric vectors).

cc.value

Value added to the cells for the “continuity correction”, within (0, 1]. The default is 0.5.

cc.type

Type of the “continuity correction” (c("single", "all")). The default is "single". "single": cc.value is added to all the cells of the studies with at least one zero cell. "all": cc.value is added to all the cells of all the studies if at least one study has a zero cell.

ci.level

The confidence level of the confidence intervals, within (0, 1). The default is 0.95.

parset

A list of the settings for the estimation, which updates the default settings. Bad initial values and bounds may cause non-convergence.

  • inital.values: The initial values of c(mu1, mu2, tau1, tau2, rho). The default is c(0.1, 0.1, 0.1, 0.1, -0.1). If it is NULL or not a vector of length 5, the estimates by mixmeta are used.

  • mu.bound: μ1\mu_1 and μ2\mu_2 are searched within [-mu.bound, mu.bound]. The default is 5.

  • tau.bound: τ1\tau_1 and τ2\tau_2 are searched within [eps, tau.bound]. The default is 5.

  • eps: The lower bound of τ1\tau_1 and τ2\tau_2. The default is 1e-5.

Details

Bivariate model

See details in srocsa.t.

SAUC

See sauc.

Continuity correction

https://en.wikipedia.org/wiki/Continuity_correction

Value

The output of nlminb (par is (mu1, mu2, tau1, tau2, rho); tau1 and tau2 are standard deviations) with the following additional elements. If nlminb failed, an object of class "try-error".

var.ml

The inverse of the numerical Hessian matrix of the negative log-likelihood.

sauc.ci

SAUC and its confidence interval.

mu1.ci, mu2.ci

The estimates and confidence intervals of μ1\mu_1 and μ2\mu_2, and of the sensitivity and specificity.

par.all

All the estimates: mu1, mu2, tau1^2, tau2^2, tau12, sauc, sens, spec.

References

Reitsma JB, Glas AS, Rutjes AW, Scholten RJ, Bossuyt PM, Zwinderman AH (2005). Bivariate analysis of sensitivity and specificity produces informative summary measures in diagnostic reviews. Journal of Clinical Epidemiology, 58(10), 982–990. doi:10.1016/j.jclinepi.2005.02.022

See Also

srocsa.t, sauc

Examples

## load data
data(IVD)

fit <- sroc(TP = TP, FN = FN, FP = FP, TN = TN, data = IVD)
fit$par.all
fit$sauc.ci

Sensitivity analysis for publication bias on the SROC curve

Description

This function conducts the likelihood-based sensitivity analysis for publication bias on the summary receiver operating characteristic (SROC) curve and the area under the SROC curve (SAUC) in meta-analysis of diagnostic test accuracy (Zhou et al., 2023). The bivariate random-effects model of the logit-transformed sensitivity and specificity is combined with a selection function on the tt-statistic of the linear combination of them with the contrast vector (c1,c2)(c_1, c_2). The model is fitted for each marginal selection probability pp in sa.p.

Usage

srocsa.t(
  TP,
  FN,
  TN,
  FP,
  data = NULL,
  cc.value = 0.5,
  cc.type = c("single", "all"),
  sa.p = 0.9,
  c11 = NULL,
  ci.level = 0.95,
  parallel.ncores = 1L,
  parset = list()
)

Arguments

TP

Specify the column of true positives (TP).

FN

Specify the column of false negatives (FN).

TN

Specify the column of true negatives (TN).

FP

Specify the column of false positives (FP).

data

A data frame containing the columns of TP, FN, TN, and FP. One row corresponds to one study. It is required.

cc.value

Value added to the cells for the “continuity correction”, within (0, 1]. The default is 0.5.

cc.type

Type of the “continuity correction” (c("single", "all")). The default is "single". "single": cc.value is added to all the cells of the studies with at least one zero cell. "all": cc.value is added to all the cells of all the studies if at least one study has a zero cell.

sa.p

A numeric vector of the marginal selection probabilities p=P(select)p = P(\mathrm{select}), within (0, 1]. The model is fitted for each value. p=1p = 1 indicates no publication bias, and β\beta and α\alpha are not estimated. The default is 0.9.

c11

Pre-specified value of c12c_1^2 within [0, 1] (c22=1−c12c_2^2 = 1 - c_1^2). If c11 = NULL (default), c12c_1^2 is estimated together with the other parameters.

ci.level

The confidence level of the confidence intervals, within (0, 1). The default is 0.95.

parallel.ncores

The number of cores used for the parallel computation over sa.p (PSOCK cluster of the package parallel); at most length(sa.p) cores are used. The default is 1L (no parallel computation).

parset

A list of the settings for the estimation, which updates the default settings. Bad bounds may cause non-convergence.

  • mu.bound: μ1\mu_1 and μ2\mu_2 are searched within [-mu.bound, mu.bound]. The default is 5.

  • tau.bound: τ1\tau_1 and τ2\tau_2 are searched within [eps, tau.bound]. The default is 5.

  • beta.interval: The lower and upper bounds of β\beta. The default is c(0, 5).

  • alpha.bound: The root of α\alpha is searched starting from the interval [-alpha.bound, alpha.bound], which is extended if necessary (see uniroot). The default is 5.

  • eps: The lower bound of τ1\tau_1 and τ2\tau_2. The default is 1e-5.

The element inital.values is not used in this function.

Details

Bivariate model

Let y1iy_{1i} and y2iy_{2i} be the logit-transformed sensitivity and specificity of study ii, and v1iv_{1i} and v2iv_{2i} be their variances. (y1i,y2i)(y_{1i}, y_{2i}) follows the bivariate normal distribution with mean (μ1,μ2)(\mu_1, \mu_2) and variance-covariance matrix diag(v1i,v2i)+Ω\mathrm{diag}(v_{1i}, v_{2i}) + \Omega, where Ω\Omega has the between-study standard deviations τ1,τ2\tau_1, \tau_2 and correlation ρ\rho.

Selection function

The probability of publishing study ii is modeled as Φ(α+βti)\Phi(\alpha + \beta t_i), where ti=(c1y1i+c2y2i)/c12v1i+c22v2it_i = (c_1 y_{1i} + c_2 y_{2i}) / \sqrt{c_1^2 v_{1i} + c_2^2 v_{2i}}, c1,c2≥0c_1, c_2 \ge 0, and c12+c22=1c_1^2 + c_2^2 = 1. For given pp and the other parameters, α\alpha is determined such that the mean of the inverse of the marginal selection probabilities of the observed studies equals 1/p1/p.

SAUC

See sauc.

Initial values

The initial values of (μ1,μ2,τ1,τ2,ρ)(\mu_1, \mu_2, \tau_1, \tau_2, \rho) are the estimates of the bivariate model without selection by mixmeta. The initial values of β\beta and c12c_1^2 are 0.1.

Continuity correction

https://en.wikipedia.org/wiki/Continuity_correction

Value

An object of class "srocsa": a list with one element for each value of sa.p and the element call. Each element is the output of nlminb (par is (mu1, mu2, tau1, tau2, rho, beta), followed by c11 when c11 = NULL) with the following additional elements, or NULL if the estimation failed.

var.ml

The inverse of the numerical Hessian matrix of the negative log-likelihood. When p=1p = 1, only for (mu1, mu2, tau1, tau2, rho).

sauc.ci

SAUC and its confidence interval.

beta, alpha

The estimates of β\beta and α\alpha (NA when p=1p = 1).

mu1.ci, mu2.ci

The estimates and confidence intervals of μ1\mu_1 and μ2\mu_2, and of the sensitivity and specificity.

par.all

All the estimates: mu1, mu2, tau1^2, tau2^2, tau12, c1^2, c2^2, beta, alpha, sauc, sens, spec.

The attribute "data" is a data frame of the study-level logit-transformed sensitivity (y1) and specificity (y2) and their variances (v1, v2), used by plot.srocsa (add.study = TRUE). The results can be shown by print.srocsa, summary.srocsa, and plot.srocsa.

References

Zhou Y, Huang A, Hattori S (2023). A likelihood-based sensitivity analysis for publication bias on the summary receiver operating characteristic in meta-analysis of diagnostic test accuracy. Statistics in Medicine, 42(6), 781–798. doi:10.1002/sim.9643

See Also

print.srocsa, summary.srocsa, plot.srocsa, reitsma.sroc, sauc

Examples

## load data
data(IVD)

## estimate c1^2
fit1 <- srocsa.t(TP = TP, FN = FN, TN = TN, FP = FP, data = IVD, sa.p = c(1, 0.8))
fit1


## three selection probabilities
fit1b <- srocsa.t(TP = TP, FN = FN, TN = TN, FP = FP, data = IVD, sa.p = c(1, 0.8, 0.6))
fit1b

## fix c1^2 = 0.5
fit2 <- srocsa.t(TP = TP, FN = FN, TN = TN, FP = FP, data = IVD,
sa.p = c(1, 0.8, 0.6), c11 = 0.5)
print(fit2)
summary(fit2)
plot(fit2)

## continuity correction for all the studies
fit3 <- srocsa.t(TP = TP, FN = FN, TN = TN, FP = FP, data = IVD, sa.p = 0.8, cc.type = "all")
fit3

## parallel computation
fit2p <- srocsa.t(TP = TP, FN = FN, TN = TN, FP = FP, data = IVD,
sa.p = c(1, 0.8, 0.6), c11 = 0.5, parallel.ncores = 2L)
print(fit2p)

Summary of 'sroc' objects

Description

Summarize the results of reitsma.sroc or hattori.tsroc (for each time point): convergence of the optimizer, the log-likelihood, the estimates of (μ1,μ2,τ1,τ2,ρ)(\mu_1, \mu_2, \tau_1, \tau_2, \rho) with standard errors (SE) and confidence intervals, the summary sensitivity, specificity, and SAUC, and all the estimates (par.all).

Usage

## S3 method for class 'sroc'
summary(object, ...)

Arguments

object

A fitted object returned by the function reitsma.sroc or hattori.tsroc.

...

Not used.

Details

The SEs are the square roots of the diagonal elements of var.ml (the inverse of the numerical Hessian matrix of the negative log-likelihood). The confidence intervals are the Wald intervals of μ1\mu_1 and μ2\mu_2, of log⁡τ1\log\tau_1 and log⁡τ2\log\tau_2, and of atanh(ρ)\mathrm{atanh}(\rho) (Fisher's z), back-transformed; so they stay within the parameter space. The confidence level is ci.level used in the fitting function (0.95 by default).

Value

An object of class "summary.sroc": a list with

call

The call of the fitting function (if recorded).

time.dependent

TRUE for the results of hattori.tsroc.

ci.level

The confidence level.

fits

A list with one element for each fit (time point), each a list of ok, K (number of studies), conv, message, logLik, coef (matrix of the estimates, SEs, and confidence limits), sauc, sens, spec (estimate and confidence limits), and par.all.

It is printed by print.summary.sroc.

See Also

print.sroc, print.summary.sroc, plot.sroc

Examples

data(IVD)
fit <- reitsma.sroc(TP = TP, FN = FN, FP = FP, TN = TN, data = IVD)
summary(fit)

## the coefficient table as a matrix
s <- summary(fit)
s$fits[[1]]$coef

## for hattori.tsroc(), one element of s$fits for each time point
data(Ki67)
Ki67_HR <- Ki67$HR
Ki67_HR$lnHR     <- log(Ki67_HR$HR)
Ki67_HR$lnHR.var <- ((log(Ki67_HR$ci.up) - log(Ki67_HR$ci.low)) / (2 * qnorm(0.975)))^2
fit2 <- hattori.tsroc(
  time.points = c(24, 36, 60),
  study.os = study,
  time.os = t, n1.os = n1, n0.os = n0,
  s1.os = s1, s0.os = s0,
  data.os = Ki67$OS,
  study.lnhr = study, lnhr = lnHR, var.lnHR = lnHR.var,
  data.lnhr = Ki67_HR,
  time.med = mct_mo, n1.med = n1, n0.med = n0,
  s1.med = s1_mct, s0.med = s0_mct,
  data.mt = Ki67$MT
)   
s2 <- summary(fit2)
s2$fits[["t = 36"]]$coef

Summary method for 'srocsa' objects

Description

This function summarizes the results: the main results (see print.srocsa) and the estimates of all the parameters (par.all) of the fitted models at each time point and each marginal selection probability pp. All the elements of the fitted models are kept in blocks of the returned object.

Usage

## S3 method for class 'srocsa'
summary(object, digits = 3, ...)

Arguments

object

A fitted object returned by the function srocsa.t, tsroc, or tsrocsa.lrt.

digits

The digits of the results

...

Other arguments in function summary

Value

A list that consists of summaries of a srocsa object: call, type of the model, table of SAUC estimates (sauc), table of parameter estimates and SE (coef), and the fitted models at each time point and each pp (blocks)

See Also

srocsa.t, hattori.tsroc, tsrocsa.lrt, print.srocsa, print.summary.srocsa

Examples

## load data
data(IVD)

fit1 <- srocsa.t(TP = TP, FN = FN, TN = TN, FP = FP, data = IVD, sa.p = c(1, 0.8, 0.6))
summary(fit1)

## tables of the estimates
res <- summary(fit1)
res$sauc
res$coef

Time-dependent SROC curve without publication bias

Description

This function estimates the time-dependent SROC curve and SAUC in meta-analysis of prognostic studies, without considering publication bias. At each time point, the time-dependent sensitivity and specificity are reconstructed from the published survival probabilities of the test-positive and test-negative groups (Combescure et al., 2016), and the bivariate random-effects model of the logit-transformed sensitivity and specificity (with the within-study covariance) is fitted by the maximum likelihood method.

Usage

tsroc(
  time.points,
  study.os,
  time.os,
  n1.os,
  n0.os,
  s1.os,
  s0.os,
  data.os = NULL,
  study.lnhr,
  lnhr,
  var.lnHR,
  data.lnhr = NULL,
  time.med,
  n1.med,
  n0.med,
  s1.med,
  s0.med,
  data.mct = NULL,
  ci.level = 0.95,
  parallel.ncores = 1L,
  parset = list()
)

Arguments

time.points

A numeric vector of the time points at which the time-dependent SROC curve is estimated. Each value should be included in time.os.

study.os

Specify the column of the study ID (numeric) in data.os.

time.os

Specify the column of the time at which the survival probabilities are reported. The unit of time should be the same as time.points and time.med.

n1.os

Specify the column of the number of subjects in the test-positive group (group 1).

n0.os

Specify the column of the number of subjects in the test-negative group (group 0).

s1.os

Specify the column of the survival probability at time.os in group 1.

s0.os

Specify the column of the survival probability at time.os in group 0.

data.os

A data frame of the survival data, with one row for each study and each time point. Within each study, the rows should be sorted in ascending order of time. If data.os = NULL (default), study.os, time.os, n1.os, n0.os, s1.os, and s0.os are evaluated in the calling environment.

study.lnhr

Specify the column of the study ID (numeric) in data.lnhr, which corresponds to study.os.

lnhr

Specify the column of lnHR (group 1 versus group 0).

var.lnHR

Specify the column of the variance of lnHR.

data.lnhr

A data frame of lnHR, with one row for each study. If data.lnhr = NULL (default), study.lnhr, lnhr, and var.lnHR are evaluated in the calling environment.

time.med

Specify the column of the median follow-up time.

n1.med

Specify the column of the number of subjects in group 1.

n0.med

Specify the column of the number of subjects in group 0.

s1.med

Specify the column of the survival probability at time.med in group 1.

s0.med

Specify the column of the survival probability at time.med in group 0.

data.mct

A data frame of the median follow-up time, with one row for each study reporting it. It is used to estimate the censoring distribution common to all the studies (see details in tsrocsa.lrt). If data.mct = NULL (default), time.med, n1.med, n0.med, s1.med, and s0.med are evaluated in the calling environment.

ci.level

The confidence level of the confidence intervals, within (0, 1). The default is 0.95.

parallel.ncores

The number of cores used for the parallel computation over time.points (PSOCK cluster of the package parallel). The default is 1L (no parallel computation).

parset

A list of the settings for the estimation, which updates the default settings. Bad initial values and bounds may cause non-convergence.

  • inital.values: The initial values of c(mu1, mu2, tau1, tau2, rho). If it is not a vector of length 5 (default), the estimates by mixmeta are used.

  • mu.bound: μ1\mu_1 and μ2\mu_2 are searched within [-mu.bound, mu.bound]. The default is 5.

  • tau.bound: τ1\tau_1 and τ2\tau_2 are searched within [eps, tau.bound]. The default is 5.

  • eps: The lower bound of τ1\tau_1 and τ2\tau_2. The default is 1e-5.

Details

The time-dependent sensitivity and specificity, and their within-study variances and covariance are calculated in the same way as tsrocsa.lrt. study.lnhr, lnhr, and var.lnHR are required as input, but lnHR is not used in the estimation of this function.

Value

An object of class "srocsa": a list with one element for each time point (named by time.points). Each element is the same as the output of sroc. The results can be shown by print.srocsa, summary.srocsa, and plot.srocsa.

References

Combescure C, Daures JP, Foucher Y (2016). A literature-based approach to evaluate the predictive capacity of a marker using time-dependent summary receiver operating characteristics. Statistical Methods in Medical Research, 25(2), 674–685. doi:10.1177/0962280212464542

See Also

tsrocsa.lrt, sroc, print.srocsa, summary.srocsa, plot.srocsa

Examples

## load data
data(Ki67)
Ki67_OS  <- Ki67$OS
Ki67_HR  <- Ki67$HR
Ki67_MCT <- Ki67$MT

## lnHR and its variance from HR and its 95 percent CI
Ki67_HR$lnHR   <- log(Ki67_HR$HR)
Ki67_HR$v.lnHR <- ((log(Ki67_HR$ci.up) - log(Ki67_HR$ci.low)) / (2 * qnorm(0.975)))^2

fit <- tsroc(
  time.points = c(24, 36, 60),
  study.os = study, time.os = t, n1.os = n1, n0.os = n0, s1.os = s1, s0.os = s0,
  data.os = Ki67_OS,
  study.lnhr = study, lnhr = lnHR, var.lnHR = v.lnHR, data.lnhr = Ki67_HR,
  time.med = mct_mo, n1.med = n1, n0.med = n0, s1.med = s1_mct, s0.med = s0_mct,
  data.mct = Ki67_MCT
)
fit
plot(fit)

Sensitivity analysis for publication bias on the time-dependent SROC curve

Description

This function conducts the likelihood-based sensitivity analysis for publication bias on the time-dependent SROC curve and SAUC in meta-analysis of prognostic studies. At each time point, the time-dependent sensitivity and specificity are reconstructed from the published survival probabilities of the test-positive and test-negative groups (Combescure et al., 2016). The logit-transformed sensitivity, specificity, and the log hazard ratio (lnHR) are modeled by the trivariate random-effects model, combined with a selection function on the tt-statistic of lnHR. The model is fitted for each time point in time.points and each marginal selection probability pp in senp.p.

Usage

tsrocsa.lrt(
  time.points,
  study.os,
  time.os,
  n1.os,
  n0.os,
  s1.os,
  s0.os,
  data.os,
  study.lnhr,
  lnhr,
  var.lnHR,
  data.lnhr,
  time.med,
  n1.med,
  n0.med,
  s1.med,
  s0.med,
  data.mt,
  senp.p = 1,
  ci.level = 0.95,
  parallel.ncores = 1L,
  parset = list()
)

Arguments

time.points

A numeric vector of the time points at which the time-dependent SROC curve is estimated. Each value should be included in time.os.

study.os

Specify the column of the study ID (numeric) in data.os.

time.os

Specify the column of the time at which the survival probabilities are reported. The unit of time should be the same as time.points and time.med.

n1.os

Specify the column of the number of subjects in the test-positive group (group 1).

n0.os

Specify the column of the number of subjects in the test-negative group (group 0).

s1.os

Specify the column of the survival probability at time.os in group 1.

s0.os

Specify the column of the survival probability at time.os in group 0.

data.os

A data frame of the survival data, with one row for each study and each time point. Within each study, the rows should be sorted in ascending order of time.

study.lnhr

Specify the column of the study ID (numeric) in data.lnhr, which corresponds to study.os.

lnhr

Specify the column of lnHR (group 1 versus group 0).

var.lnHR

Specify the column of the variance of lnHR.

data.lnhr

A data frame of lnHR, with one row for each study.

time.med

Specify the column of the median follow-up time.

n1.med

Specify the column of the number of subjects in group 1.

n0.med

Specify the column of the number of subjects in group 0.

s1.med

Specify the column of the survival probability at time.med in group 1.

s0.med

Specify the column of the survival probability at time.med in group 0.

data.mt

A data frame of the median follow-up time, with one row for each study reporting it. It is used to estimate the censoring distribution common to all the studies (see details).

senp.p

A numeric vector of the marginal selection probabilities p=P(select)p = P(\mathrm{select}), within (0, 1]. The model is fitted for each value. When p=1p = 1, the bivariate model of the logit-transformed sensitivity and specificity without selection is fitted (lnHR is not used). The default is 1.

ci.level

The confidence level of the confidence intervals, within (0, 1). The default is 0.95.

parallel.ncores

The number of cores used for the parallel computation over time.points (PSOCK cluster of the package parallel). The default is 1L (no parallel computation).

parset

A list of the settings for the estimation, which updates the default settings. Bad bounds may cause non-convergence.

  • mu.bound: μ1,μ2,μ3\mu_1, \mu_2, \mu_3 are searched within [-mu.bound, mu.bound]. The default is 5.

  • tau.bound: The upper bound of τ1,τ2,τ3\tau_1, \tau_2, \tau_3. The default is 5.

  • beta.interval: The lower and upper bounds of β\beta. The default is c(0, 5).

  • alpha.bound: The root of α\alpha is searched starting from the interval [-alpha.bound, alpha.bound], which is extended if necessary (see uniroot). The default is 5.

  • eps: The lower bound of τ1\tau_1 and τ2\tau_2 when p=1p = 1. The default is 1e-5.

Details

Time-dependent sensitivity and specificity

At time tt, Se(t)=(1−S1(t))q1/((1−S1(t))q1+(1−S0(t))q0)\mathrm{Se}(t) = (1 - S_1(t)) q_1 / ((1 - S_1(t)) q_1 + (1 - S_0(t)) q_0) and Sp(t)=S0(t)q0/(S1(t)q1+S0(t)q0)\mathrm{Sp}(t) = S_0(t) q_0 / (S_1(t) q_1 + S_0(t) q_0), where S1(t)S_1(t) and S0(t)S_0(t) are the survival probabilities of groups 1 and 0, and q1=n1/(n1+n0)q_1 = n_1 / (n_1 + n_0) and q0=1−q1q_0 = 1 - q_1. Survival probabilities of 1 and 0 are replaced by (n+0.5)/(n+1)(n + 0.5) / (n + 1) and 0.5/(n+1)0.5 / (n + 1).

Within-study variances and covariances

They are calculated from the survival probabilities up to tt, assuming the censoring distribution G(t)=exp⁡(−ηt)G(t) = \exp(-\eta t) common to all the studies. η\eta is estimated within [0, 1] by least squares from data.mt, such that the pooled survival probability at the median follow-up time multiplied by GG is close to 0.5.

Selection function

The probability of publishing study ii is modeled as Φ(α+βti)\Phi(\alpha + \beta t_i), where tit_i is lnHR divided by its standard error. For given pp and the other parameters, α\alpha is determined such that the mean of the inverse of the marginal selection probabilities of the observed studies equals 1/p1/p.

SAUC

The SROC curve and SAUC are calculated from the parameters of the logit-transformed sensitivity and specificity. See sauc.

Value

An object of class "srocsa": a list with one element for each time point (named by time.points), each of which is a list with one element for each value of senp.p (named by senp.p). For p=1p = 1, each element is the same as the output of reitsma.sroc. For p<1p < 1, each element is the output of nlminb (par is (mu1, mu2, mu3, tau1, tau2, tau3, rho1, rho2, rho3, beta); rho1, rho2, and rho3 are the correlations of (1, 2), (2, 3), and (1, 3)) with the additional elements sauc, beta, alpha, mu1.ci, mu2.ci, mu3.ci, par.all, sauc.ci, and var.ml (index 1: logit-sensitivity, 2: logit-specificity, 3: lnHR). The list at each time point has the attribute "data": a data frame of the study-level logit-transformed sensitivity (y1) and specificity (y2) and their variances (v1, v2), used by plot.srocsa (add.study = TRUE). The results can be shown by print.srocsa, summary.srocsa, and plot.srocsa.

References

Combescure C, Daures JP, Foucher Y (2016). A literature-based approach to evaluate the predictive capacity of a marker using time-dependent summary receiver operating characteristics. Statistical Methods in Medical Research, 25(2), 674–685. doi:10.1177/0962280212464542

See Also

hattori.tsroc, print.srocsa, summary.srocsa, plot.srocsa, sauc

Examples

## load data
data(Ki67)
head(Ki67$OS)
head(Ki67$HR)
head(Ki67$MT)

## Define datasets of the HR
Ki67_OS <- Ki67$OS
Ki67_HR <- Ki67$HR
Ki67_MT <- Ki67$MT

## lnHR and its variance from HR and its 95 percent CI
Ki67_HR$lnHR   <- log(Ki67_HR$HR)
Ki67_HR$lnHR.var <- ((log(Ki67_HR$ci.up) - log(Ki67_HR$ci.low)) / (2 * qnorm(0.975)))^2

fit <- tsrocsa.lrt(
  time.points = c(36, 60),
  study.os = study,
  time.os = t, n1.os = n1, n0.os = n0,
  s1.os = s1, s0.os = s0,
  data.os = Ki67_OS,
  study.lnhr = study, lnhr = lnHR, var.lnHR = lnHR.var,
  data.lnhr = Ki67_HR,
  time.med = mct_mo, n1.med = n1, n0.med = n0,
  s1.med = s1_mct, s0.med = s0_mct,
  data.mt = Ki67_MT,
  senp.p = c(1, 0.8)
)
fit


##
print(fit)
summary(fit)

## plots
plot(fit, ask = FALSE)                       # all time points, one per page, no prompt
plot(fit, time = 36, add.study = TRUE)       # one time point with the studies
plot(fit, overlay = TRUE)                    # all time points in one panel


## interactive: press <Return> to move to the next time point
if (interactive()) plot(fit, add.study = TRUE, study.size = "precision")




## Using paralell computing
fitp <- tsrocsa.lrt(
  time.points = c(36, 60),
  study.os = study,
  time.os = t, n1.os = n1, n0.os = n0,
  s1.os = s1, s0.os = s0,
  data.os = Ki67_OS,
  study.lnhr = study, lnhr = lnHR, var.lnHR = lnHR.var,
  data.lnhr = Ki67_HR,
  time.med = mct_mo, n1.med = n1, n0.med = n0,
  s1.med = s1_mct, s0.med = s0_mct,
  data.mt = Ki67_MT,
  senp.p = c(1, 0.8),
  parallel.ncores = 2L
)
print(fitp)