| Type: | Package |
| Title: | Diagnostic and Prognostic Meta-Analysis with Sensitivity Analysis |
| Version: | 0.1.1 |
| Author: | Ryota Kinugawa [aut, ctb],
Kota Nakaike [aut, ctb],
Yamato Hashimoto [aut, ctb],
Yi Zhou |
| Maintainer: | Yi Zhou <zhouy@people.kobe-u.ac.jp> |
| 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>. |
| License: | GPL (≥ 3) |
| Encoding: | UTF-8 |
| LazyData: | true |
| Config/roxygen2/version: | 8.1.1 |
| Depends: | R (≥ 3.5) |
| Imports: | graphics, grDevices, lifecycle, mixmeta, numDeriv, parallel, stats, utils |
| URL: | https://kusuri26.github.io/DiagProgMeta/, https://github.com/kusuri26/DiagProgMeta/ |
| BugReports: | https://github.com/kusuri26/DiagProgMeta/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-11-08 05:05:35 UTC; nkota |
| Repository: | CRAN |
| Date/Publication: | 2026-12-03 15:50:08 UTC |
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
Objects of class
"sroc"(fromreitsma.srocandhattori.tsroc):print.sroc,summary.sroc(printed byprint.summary.sroc), andplot.sroc.Objects of class
"srocsa"(fromsrocsa.tandtsrocsa.lrt):print.srocsa,summary.srocsa, andplot.srocsa.
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
-
Ki67: meta-analysis of Ki-67 as a prognostic marker in early breast cancer.
Author(s)
Maintainer: Yi Zhou zhouy@people.kobe-u.ac.jp (ORCID)
Authors:
Yi Zhou zhouy@people.kobe-u.ac.jp (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:
Report bugs at https://github.com/kusuri26/DiagProgMeta/issues
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)
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),n1andn0(sample sizes in the two comparison groups), ands1ands0(survival probabilities in the two groups).- HR
Dataset containing hazard-ratio data. It includes
author(study author),study(study identifier),HR(hazard ratio), andci.lowandci.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),n1andn0(sample sizes in the two comparison groups),mct_mo(median follow-up time in months),s1_mctands0_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)
Default settings for the estimation
Description
Default settings for the estimation of the SROC and time-dependent SROC models.
The elements can be modified through the parset argument of the fitting functions;
the user-specified list updates the default list by modifyList.
-
default.parset.sroc(): used byreitsma.srocandsrocsa.t(bivariate model of the logit-transformed sensitivity and specificity). -
default.parset.tsroc.pb(): used byhattori.tsrocandtsrocsa.lrt(trivariate model of the logit-transformed sensitivity, specificity, and lnHR).
Usage
default.parset.sroc()
default.parset.tsroc.pb()
Value
A list of the default settings with the following elements:
inital.valuesInitial values of the parameters. In
default.parset.sroc(), a vector of length 5:c(mu1, mu2, tau1, tau2, rho)= c(0.1, 0.1, 0.1, 0.1, -0.1). Indefault.parset.tsroc.pb(), a vector of length 9:c(mu1, mu2, mu3, tau1, tau2, tau3, rho1, rho2, rho3)= c(0.1, 0.1, 0.1, 0.1, 0.1, 0.1, -0.1, -0.1, -0.1), whererho1,rho2, andrho3are the correlations of (1, 2), (2, 3), and (1, 3) (index 1: logit-sensitivity, 2: logit-specificity, 3: lnHR). The values are used by the bivariate model (reitsma.sroc, andtsrocsa.lrtwithp = 1) only when the length is 5; otherwise, the initial values are the estimates bymixmeta. They are not used bysrocsa.t.mu.boundThe means
\mu_kare searched within[-mu.bound, mu.bound]. The default is 5.tau.boundThe upper bound of the between-study standard deviations
\tau_k. The default is 5.beta.intervalThe lower and upper bounds of
\betain the selection function. The default isc(0, 5).alpha.boundThe root of
\alphain the selection function is searched starting from[-alpha.bound, alpha.bound], which is extended if necessary (seeuniroot). The default is 5.epsThe lower bound of the between-study standard deviations
\tau_1and\tau_2. The default is1e-5.
See Also
reitsma.sroc,
srocsa.t,
hattori.tsroc,
tsrocsa.lrt
Examples
default.parset.sroc()
default.parset.tsroc.pb()
## change the bounds of the means
str(utils::modifyList(default.parset.sroc(), list(mu.bound = 10)))
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 |
study.os |
Specify the column of the study ID (numeric) in |
time.os |
Specify the column of the time at which the survival probabilities are reported.
The unit of time should be the same as |
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 |
s0.os |
Specify the column of the survival probability at |
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 |
study.lnhr |
Specify the column of the study ID (numeric) in |
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 |
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 |
s0.med |
Specify the column of the survival probability at |
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 |
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 |
parset |
A list of the settings for the estimation, which updates the default settings. Bad initial values and bounds may cause non-convergence.
|
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)
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 |
time |
Time points to plot (only for |
time.index |
Logical; if |
overlay |
Logical; if |
ask |
Logical; whether to wait for <Return> before each new page.
Default |
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 |
ci.level |
Confidence level of the bands and the region. Default 0.95. |
add.study |
Logical; whether to add the observed studies
( |
study.size |
Size of the study points: |
study.pch, study.cex |
Symbol and (base) size of the study points. |
study.col |
Color of the study points. Default |
add.sauc |
Logical; whether to show the SAUC (and its CI) in a legend. |
legend.pos |
Position of the legend (see |
sroc.cols |
Color(s) of the SROC curves. Recycled over time points when |
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 |
addon |
Logical; if |
n.grid |
Number of grid points to draw each curve. |
... |
Other graphical arguments passed to |
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 p,
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 p 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 p.
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 |
time |
Time points to plot (only for the results from |
p |
Values of the marginal selection probability |
overlay |
Logical; if |
ask |
Logical; whether to wait for <Return> before each new time point.
Default |
sroc.cols |
Colors of the SROC curves: one for each |
sroc.lty |
Line types of the SROC curves, recycled over |
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 |
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
( |
study.size |
Size of the study points: |
study.pch, study.cex |
Symbol and (base) size of the study points. |
study.col |
Color of the study points. Default |
add.sauc |
Whether to show the SAUC (and its CI) for each |
legend.pos |
Position of the legend. See |
legend.cex |
Size of the legend text. |
main |
Title of the plot.
If |
xlab |
Label of x-axis. |
ylab |
Label of y-axis. |
n.grid |
Number of grid points to draw each curve. |
... |
Other arguments in function |
Details
For p < 1 in tsrocsa.lrt, the SROC curve is calculated from
(\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 (\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 |
digits |
The number of decimal places of the results. |
... |
Other arguments in function |
Details
- Conv
"yes"indicates thatnlminbconverged (convergence = 0).- SAUC
The confidence interval is
sauc.ciof the fitted object (calculated on the logit scale; seesauc).- Sens, Spec
\mathrm{plogis}(\mu_1)and\mathrm{plogis}(\mu_2); the confidence intervals are the Wald intervals of\mu_1and\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 p.
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 |
digits |
The digits of the results |
... |
Other arguments in function |
Details
- Optimizer
1 indicates that
nlminbconverged (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 = 1, or the model without selection). The SE of alpha is not available.- Results from
tsroc Shown as
p = 1, becausetsrocfits 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 |
digits |
The number of decimal places of the results. |
... |
Other arguments in function |
Value
x, invisibly. Called for the side effect of printing.
See Also
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 |
digits |
The digits of the results |
... |
Other arguments in function |
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 |
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” ( |
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.
|
Details
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.mlThe inverse of the numerical Hessian matrix of the negative log-likelihood.
sauc.ciSAUC and its confidence interval.
mu1.ci,mu2.ciThe estimates and confidence intervals of
\mu_1and\mu_2, and of the sensitivity and specificity.par.allAll the estimates:
mu1,mu2,tau1^2,tau2^2,tau12,sauc,sens,spec.dataA data frame of the study-level logit-transformed sensitivity (
y1) and specificity (y2) and their within-study variances (v1,v2), used byplot.srocto 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
|
ci.level |
The confidence level of the confidence interval, within (0, 1).
It is required when |
Details
- SROC curve
The SROC curve is
\mathrm{Se} = \mathrm{logit}^{-1}(\mu_1 - (\rho \tau_1 / \tau_2) (\mathrm{logit}(x) + \mu_2)), wherexis the false positive rate (1 - specificity). SAUC is its integral overx \in (0, 1)byintegrate.- 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
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 |
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” ( |
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.
|
Details
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.mlThe inverse of the numerical Hessian matrix of the negative log-likelihood.
sauc.ciSAUC and its confidence interval.
mu1.ci,mu2.ciThe estimates and confidence intervals of
\mu_1and\mu_2, and of the sensitivity and specificity.par.allAll 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
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 t-statistic of the linear combination of them
with the contrast vector (c_1, c_2).
The model is fitted for each marginal selection probability p 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 |
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” ( |
sa.p |
A numeric vector of the marginal selection probabilities |
c11 |
Pre-specified value of |
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 |
parset |
A list of the settings for the estimation, which updates the default settings. Bad bounds may cause non-convergence.
The element |
Details
- Bivariate model
Let
y_{1i}andy_{2i}be the logit-transformed sensitivity and specificity of studyi, andv_{1i}andv_{2i}be their variances.(y_{1i}, y_{2i})follows the bivariate normal distribution with mean(\mu_1, \mu_2)and variance-covariance matrix\mathrm{diag}(v_{1i}, v_{2i}) + \Omega, where\Omegahas the between-study standard deviations\tau_1, \tau_2and correlation\rho.- Selection function
The probability of publishing study
iis modeled as\Phi(\alpha + \beta t_i), wheret_i = (c_1 y_{1i} + c_2 y_{2i}) / \sqrt{c_1^2 v_{1i} + c_2^2 v_{2i}},c_1, c_2 \ge 0, andc_1^2 + c_2^2 = 1. For givenpand the other parameters,\alphais determined such that the mean of the inverse of the marginal selection probabilities of the observed studies equals1/p.- SAUC
See
sauc.- Initial values
The initial values of
(\mu_1, \mu_2, \tau_1, \tau_2, \rho)are the estimates of the bivariate model without selection bymixmeta. The initial values of\betaandc_1^2are 0.1.- 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.mlThe inverse of the numerical Hessian matrix of the negative log-likelihood. When
p = 1, only for(mu1, mu2, tau1, tau2, rho).sauc.ciSAUC and its confidence interval.
beta,alphaThe estimates of
\betaand\alpha(NAwhenp = 1).mu1.ci,mu2.ciThe estimates and confidence intervals of
\mu_1and\mu_2, and of the sensitivity and specificity.par.allAll 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 (\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 |
... |
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 \mu_1 and \mu_2,
of \log\tau_1 and \log\tau_2, and of
\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
callThe call of the fitting function (if recorded).
time.dependentTRUEfor the results ofhattori.tsroc.ci.levelThe confidence level.
fitsA 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), andpar.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 p.
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 |
digits |
The digits of the results |
... |
Other arguments in function |
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 p (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 |
study.os |
Specify the column of the study ID (numeric) in |
time.os |
Specify the column of the time at which the survival probabilities are reported.
The unit of time should be the same as |
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 |
s0.os |
Specify the column of the survival probability at |
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 |
study.lnhr |
Specify the column of the study ID (numeric) in |
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 |
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 |
s0.med |
Specify the column of the survival probability at |
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 |
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 |
parset |
A list of the settings for the estimation, which updates the default settings. Bad initial values and bounds may cause non-convergence.
|
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 t-statistic of lnHR.
The model is fitted for each time point in time.points and
each marginal selection probability p 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 |
study.os |
Specify the column of the study ID (numeric) in |
time.os |
Specify the column of the time at which the survival probabilities are reported.
The unit of time should be the same as |
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 |
s0.os |
Specify the column of the survival probability at |
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 |
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 |
s0.med |
Specify the column of the survival probability at |
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 |
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 |
parset |
A list of the settings for the estimation, which updates the default settings. Bad bounds may cause non-convergence.
|
Details
- Time-dependent sensitivity and specificity
At time
t,\mathrm{Se}(t) = (1 - S_1(t)) q_1 / ((1 - S_1(t)) q_1 + (1 - S_0(t)) q_0)and\mathrm{Sp}(t) = S_0(t) q_0 / (S_1(t) q_1 + S_0(t) q_0), whereS_1(t)andS_0(t)are the survival probabilities of groups 1 and 0, andq_1 = n_1 / (n_1 + n_0)andq_0 = 1 - q_1. Survival probabilities of 1 and 0 are replaced by(n + 0.5) / (n + 1)and0.5 / (n + 1).- Within-study variances and covariances
They are calculated from the survival probabilities up to
t, assuming the censoring distributionG(t) = \exp(-\eta t)common to all the studies.\etais estimated within [0, 1] by least squares fromdata.mt, such that the pooled survival probability at the median follow-up time multiplied byGis close to 0.5.- Selection function
The probability of publishing study
iis modeled as\Phi(\alpha + \beta t_i), wheret_iis lnHR divided by its standard error. For givenpand the other parameters,\alphais determined such that the mean of the inverse of the marginal selection probabilities of the observed studies equals1/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 = 1, each element is the same as the output of reitsma.sroc.
For p < 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)