| Title: | Diagnostic Test Accuracy Meta-Analysis using Template Model Builder |
| Version: | 0.1.0 |
| Description: | Fits the hierarchical summary receiver operating characteristic (HSROC) model of Rutter and Gatsonis (2001) <doi:10.1002/sim.942>, the bivariate binomial-normal model of Reitsma et al. (2005) <doi:10.1016/j.jclinepi.2005.02.022>, and the threshold-based bivariate time-to-event model of Hoyer et al. (2018) <doi:10.1002/jrsm.1273> using Template Model Builder (TMB). Provides subgroup analyses, HSROC meta-regression, likelihood-ratio tests, SROC plots, and coupled forest plots. |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| Encoding: | UTF-8 |
| Imports: | forestploter, glmmTMB, grid, survival, TMB |
| LinkingTo: | RcppEigen, TMB |
| Suggests: | knitr, quarto, testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| Depends: | R (≥ 3.5) |
| LazyData: | true |
| Config/roxygen2/version: | 8.0.0 |
| VignetteBuilder: | quarto |
| NeedsCompilation: | yes |
| Packaged: | 2026-07-08 07:35:43 UTC; CNowak |
| Author: | Claus Nowak [aut, cre] |
| Maintainer: | Claus Nowak <claus.nowak@donau-uni.ac.at> |
| Repository: | CRAN |
| Date/Publication: | 2026-07-16 13:50:02 UTC |
dtametaTMB: Diagnostic Test Accuracy Meta-Analysis using Template Model Builder
Description
Functions for fitting diagnostic test accuracy (DTA) meta-analysis models using Template Model Builder (TMB).
Details
Implemented methods
Reitsma model
Rutter-Gatsonis HSROC model
Hoyer multiple-threshold model
Main workflow
fitReitsma() -> plot() -> forest()
fitReitsmaSubgroup() -> plot() -> forest()
fitRutterGatsonis() -> plot() -> forest()
fitRutterGatsonisSubgroup() -> plot() -> forest()
fitHoyer() -> plot() -> forest()
Included datasets
anaemia
anticcp
diabetes
FENO
RF
schuetz
See the package vignettes for worked examples and model descriptions.
Author(s)
Maintainer: Claus Nowak claus.nowak@donau-uni.ac.at
Authors:
Claus Nowak claus.nowak@donau-uni.ac.at
FENO dataset
Description
This is the FENO data set from Schneider (2017) from a review of fractional exhaled nitric oxide (FeNO) for diagnosis of asthma.
Usage
FENO
Format
A data frame with 150 rows and 7 variables:
- study
Study identifier
- study_id
Study identifier (numeric)
- cutoff
Threshold for FeNO measured in ppb
- TP
Number of true positives
- FN
Number of false negatives
- FP
Number of false positives
- TN
Number of true negatives
Note
The data are reproduced from the original source and the supplementary material accompanying the Cochrane Handbook. However, the study 'Schneider 2013' contains inconsistent diseased counts (TP + FN). To illustrate the Hoyer analysis in the vignette, we modify the TP counts in rows 118–120 from 39 to 38. Other corrections restoring internal consistency are also conceivable.
Source
Schneider, A. et al. (2017). A novel statistical model for analyzing data of a systematic review generates optimal cutoff values for fractional exhaled nitric oxide for asthma diagnosis. Journal of Clinical Epidemiology, 92, 69-78. doi:10.1016/j.jclinepi.2017.09.001
RF dataset
Description
This is the RF data set from Nishimura (2007) from a review of rheumatoid factor (RF) to diagnose rheumatoid arthritis.
Usage
RF
Format
A data frame with 50 rows and 8 variables:
- study
Study identifier
- year
Year of the study
- TP
Number of true positives
- FP
Number of false positives
- FN
Number of false negatives
- TN
Number of true negatives
- cutoff
Threshold used in U/mL for test positivity
- method
Different methods used to perform the test
Source
Nishimura, K. et al. (2007). Meta-analysis: diagnostic accuracy of anti-cyclic citrullinated peptide antibody and rheumatoid factor for rheumatoid arthritis. Annals of Internal Medicine, 146(11), 392-403. doi:10.7326/0003-4819-146-11-200706050-00008
Anaemia (synthetic data set)
Description
This is a synthetic data set where haemoglobin was measured by a point-of-care device, with laboratory measurement acting as the reference standard. Lower values indicate disease (anaemia).
Usage
anaemia
Format
A data frame with 81 rows and 11 variables:
- study
Study identifier
- threshold
Haemoglobin in g/dL
- TP
Number of true positives
- FN
Number of false negatives
- FP
Number of false positives
- TN
Number of true negatives
- D
Number of diseased individuals
- H
Number of healthy individuals
- sens
Sensitivity
- fpr
False positive rate
- testdirection
Smaller values indicate disease (=less)
Source
Synthetic dataset.
Likelihood Ratio Tests for Diagnostic Test Accuracy Models
Description
Compare nested diagnostic test accuracy meta-analysis models using likelihood ratio tests (LRTs).
Usage
## S3 method for class 'Reitsma'
anova(object, ..., test = "Chisq")
## S3 method for class 'ReitsmaSubgroup'
anova(object, ..., test = "Chisq")
## S3 method for class 'RutterGatsonis'
anova(object, ..., test = "Chisq")
## S3 method for class 'RutterGatsonisSubgroup'
anova(object, ..., test = "Chisq")
## S3 method for class 'RutterGatsonisReg'
anova(object, ..., test = "Chisq")
Arguments
object |
A fitted model object. |
... |
Additional fitted model objects to be compared. |
test |
Character string specifying the test to perform. Currently,
only |
Details
These methods compute likelihood ratio statistics from the fitted model log-likelihoods and compare models ordered by increasing numbers of estimated parameters. The test statistic is
-2(\ell_0 - \ell_1)
where \ell_0 and \ell_1 are the log-likelihoods of two nested
models. Under standard regularity conditions, the statistic follows a
chi-squared distribution with degrees of freedom equal to the difference
in the numbers of estimated parameters.
The models supplied should be nested and fitted to the same dataset. Warnings are issued when models have identical numbers of parameters or when the log-likelihood decreases for a more complex model, suggesting that the nesting assumptions may be violated.
Value
An object of class "anova" inheriting from "data.frame" with
the following columns:
- Df
Number of estimated parameters in the model.
- logLik
Model log-likelihood.
- Df.diff
Difference in parameters compared with the previous model.
- Chisq
Likelihood ratio chi-squared statistic.
- Pr(>Chisq)
P-value from the chi-squared test.
See Also
Anticcp dataset
Description
This is the anticcp data set from Nishimura (2007) from a review of anti-cyclic citrullinated peptide antibody (anti-ccp) to diagnose rheumatoid arthritis.
Usage
anticcp
Format
A data frame with 37 rows and 7 variables:
- study
Study identifier
- year
Year of the study
- TP
Number of true positives
- FP
Number of false positives
- FN
Number of false negatives
- TN
Number of true negatives
- generation
First generation (CCP1) or second generation (CCP2) assay
Source
Nishimura, K. et al. (2007). Meta-analysis: diagnostic accuracy of anti-cyclic citrullinated peptide antibody and rheumatoid factor for rheumatoid arthritis. Annals of Internal Medicine, 146(11), 392-403. doi:10.7326/0003-4819-146-11-200706050-00008
Export Model Results for RevMan
Description
Converts fitted model objects (Reitsma, ReitsmaSubgroup, RutterGatsonis,
RutterGatsonisSubgroup) into a format suitable for manual entry
into the Diagnostic Test Accuracy module of Review Manager (RevMan).
Usage
as_revman(x, ...)
## S3 method for class 'Reitsma'
as_revman(x, ...)
## S3 method for class 'RutterGatsonis'
as_revman(x, ...)
## S3 method for class 'ReitsmaSubgroup'
as_revman(x, ...)
## S3 method for class 'RutterGatsonisSubgroup'
as_revman(x, ...)
Arguments
x |
A fitted model object. |
... |
Currently not used. |
Value
A data frame with columns:
- Subgroup
Only returned for
ReitsmaSubgroupandRutterGatsonisSubgroupobjects.- Externally_Calculated_Parameters
Revman model/parameter types.
- Parameter
RevMan parameter name.
- Estimate
Parameter estimate.
The returned table contains the model parameters displayed by RevMan:
-
E(logitSe) -
E(logitSp) -
Var(logitSe) -
Var(logitSp) -
Cov(logits) -
Corr(logits) -
Lambda -
Theta -
beta -
Var(accuracy) -
Var(threshold) -
SE(E(logitSe)) -
SE(E(logitSp)) -
Cov(Es) -
Studies
Note
For Rutter and Gatsonis models SE(E(logitSe)), SE(E(logitSp)), and Cov(Es) are not computed.
Diabetes dataset
Description
This is the diabetes data set from the supplementary material in Hoyer (2018).
Usage
diabetes
Format
A data frame with 124 rows and 9 variables
- study
Study identifier
- threshold
Threshold HbA1c used to derive TP, FN, FP, TN
- TP
Number of true positives
- TN
Number of true negatives
- FP
Number of false positives
- FN
Number of false negatives
- D
Number of diseased individuals
- H
Number of healthy individuals
- originally_published
Whether the data threshold/row was used in the original publication (1=yes, 0=no)
Source
Hoyer, A., Hirt, S., Kuss, O. (2018). Meta-analysis of full ROC curves using bivariate time-to-event models for interval-censored data. Research Synthesis Methods, 9(1), 62-72. doi:10.1002/jrsm.1273
Fit Threshold-Based Bivariate Time-to-Event Model (Hoyer)
Description
This is a high-level wrapper that performs the full workflow for fitting the Hoyer AFT model:
Restructuring of threshold-based data into interval format
Estimation of initial parameter values
Model fitting via likelihood maximization
The input data must contain cumulative counts for true positives, false positives, false negatives, and true negatives at multiple thresholds within each study.
Usage
fitHoyer(
data,
TP,
FP,
FN,
TN,
study,
threshold,
smallest,
largest,
testdirection = c("greater", "less"),
eval_threshold = NULL,
conflevel = 0.95,
dist = "loglogistic",
verbose = FALSE,
...
)
Arguments
data |
A data.frame containing study-level data. |
TP |
True positives (column name). |
FP |
False positives (column name). |
FN |
False negatives (column name). |
TN |
True negatives (column name). |
study |
Study identifier (column name). |
threshold |
The observed threshold value (column name). Must be positive and strictly increasing within each study. |
smallest |
Positive lower bound used to define the
leftmost interval. Must be smaller than minimum |
largest |
Positive upper bound used to define the
rightmost interval. Must be greater than maximum |
testdirection |
Direction of the test. Enter |
eval_threshold |
Optional numeric value or vector specifying the
prediction grid threshold(s) at which sensitivity and specificity
should be evaluated. If |
conflevel |
Confidence level for confidence intervals for sensitivities
and specificities at the chosen thresholds. Defaults to |
dist |
Character string specifying the parametric distribution
for the AFT model. One of |
verbose |
Whether TMB optimization output should be printed (default: FALSE). |
... |
Additional arguments passed to |
Details
Fits the threshold-based bivariate accelerated failure time (AFT) model for diagnostic test accuracy (DTA) meta-analysis as described by Hoyer et al. (2018). The model is estimated using interval-censored likelihoods via Template Model Builder (TMB).
The function internally calls:
-
restructure_datato convert cumulative counts into interval-censored data -
initHoyerAFTto estimate starting values -
fitHoyerAFTto fit the model
Missing values in the input data are removed prior to analysis. A message is issued listing the affected studies.
Value
An object of class "HoyerAFT" as returned by
fitHoyerAFT, containing:
- data
Processed original data
- restructured
Interval-formatted data
- fit
Optimization output
- sdreport
TMB report object
- sdreport2
Summary of reported parameters
- sensspec
Sensitivity and specificity estimates
Note
Requires a compiled TMB model named "Hoyer".
References
Hoyer, A., Hirt, S., Kuss, O. (2018). Meta-analysis of full ROC curves using bivariate time-to-event models for interval-censored data. Research Synthesis Methods, 9(1), 62-72. doi:10.1002/jrsm.1273
Examples
data("diabetes")
fit <- fitHoyer(
data = diabetes,
TP = TP,
FP = FP,
FN = FN,
TN = TN,
study = study,
threshold = threshold,
testdirection = "greater",
smallest = 2,
largest = 10
)
summary(fit)
Fit Threshold-Based Bivariate Time-to-Event Model (Hoyer AFT)
Description
Fits a bivariate accelerated failure time (AFT) model for diagnostic test accuracy (DTA) data using interval-censored likelihoods as described in Hoyer et al. (2018). The model is estimated using Template Model Builder (TMB) with study-specific random effects.
Usage
fitHoyerAFT(
data,
init,
conflevel = 0.95,
eval_threshold = NULL,
verbose = FALSE
)
Arguments
data |
A list as produced by
|
init |
A data frame of initial parameter values as produced by
|
conflevel |
Confidence level for confidence intervals for sensitivities
and specificities at the chosen thresholds. Defaults to |
eval_threshold |
Optional numeric value or vector specifying the
prediction grid threshold(s) at which sensitivity and specificity
should be evaluated. If |
verbose |
Whether TMB optimization output should be printed (default: FALSE). |
Details
The model reports logit-survival quantities, which correspond to sensitivity
and false positive rate for testdirection = "greater", and to false
negative rate and specificity for testdirection = "less".
Model fitting is performed using nlminb, and uncertainty
estimates are obtained via TMB::sdreport. Parameter
transformations include log-scale parameters and Fisher's Z-transform
for correlations.
Value
An object of class "HoyerAFT" containing:
- data
Processed original data
- restructured
Interval-formatted data
- fit
Optimization output from
nlminb- sdreport
TMB report object from
sdreport- sdreport2
Summary of reported parameters
- distcode
Distribution code used in the model
- sensspec
Sensitivities and specificities at the chosen thresholds
Note
Requires a compiled TMB model named "Hoyer".
References
Hoyer, A., Hirt, S., Kuss, O. (2018). Meta-analysis of full ROC curves using bivariate time-to-event models for interval-censored data. Research Synthesis Methods, 9(1), 62-72. doi:10.1002/jrsm.1273
Examples
data("diabetes")
res <- restructure_data(
data = diabetes,
TP = TP,
FP = FP,
FN = FN,
TN = TN,
threshold = threshold,
study = study,
smallest = 2,
largest = 10
)
init <- initHoyerAFT(res$restructured)
fit <- fitHoyerAFT(res, init)
summary(fit)
Fit Reitsma Model
Description
Fits the Reitsma bivariate random-effects model for diagnostic test accuracy (DTA)
meta-analysis using a binomial-normal likelihood via glmmTMB.
Usage
fitReitsma(data, TP, FP, FN, TN, study, constrain = NULL, conflevel = 0.95)
Arguments
data |
A data.frame containing study-level data. |
TP |
True positives (column name). |
FP |
False positives (column name). |
FN |
False negatives (column name). |
TN |
True negatives (column name). |
study |
Study identifier (column name). |
constrain |
Optional character string specifying a simplified covariance structure for the Reitsma model. This can be useful for sparse data, small meta-analyses, or for reproducing simplified bivariate models described in the Cochrane Handbook for Diagnostic Test Accuracy Reviews. Allowed values are:
|
conflevel |
Confidence level for confidence intervals. Default is 0.95. |
Value
A list of class "Reitsma" with components:
-
data: the original data set with derived quantities -
glmmTMB: fitted model object. -
estimates: parameter estimates with SE. -
vcov: variance-covariance matrix. -
sensspec: sensitivity and specificity estimates. -
LRDOR: Diagnostic odds ratio and likelihood ratios. -
RutterGatsonis_recovered: Recovered parameters in the Rutter-Gatsonis (HSROC) parameterization. -
constrain: Random effects parameters fixed at zero.
References
Reitsma, J. B., et al. (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
Rutter, C. M., & Gatsonis, C. A. (2001). A hierarchical regression approach to meta-analysis of diagnostic test accuracy evaluations. Statistics in Medicine, 20(19), 2865–2884. doi:10.1002/sim.942
Harbord, R. M., Deeks, J. J., Egger, M., Whiting, P., & Sterne, J. A. C. (2007). A unification of models for meta-analysis of diagnostic accuracy studies. Biostatistics, 8(2), 239–251. doi:10.1093/biostatistics/kxl004
Examples
data("anticcp")
fit <- fitReitsma(
data = anticcp,
TP = TP,
FP = FP,
FN = FN,
TN = TN,
study = study
)
fit$estimates
Fit Reitsma Subgroup Model
Description
Fits the Reitsma bivariate random-effects model with a single categorical covariate
for diagnostic test accuracy (DTA) meta-analysis using a binomial-normal
likelihood via glmmTMB. The model is fitted twice, once with dummy/reference
cell coding, and once with central-mean parameterization.
Usage
fitReitsmaSubgroup(
data,
TP,
FP,
FN,
TN,
study,
subgroup,
constrain = NULL,
sensspec_constrain = NULL,
variances = c("common", "unequal"),
conflevel = 0.95
)
Arguments
data |
A data.frame containing study-level data. |
TP |
True positives (column name). |
FP |
False positives (column name). |
FN |
False negatives (column name). |
TN |
True negatives (column name). |
study |
Study identifier (column name). |
subgroup |
A single categorical study-level subgroup variable (column name). |
constrain |
Optional character string specifying a simplified covariance structure for the Reitsma model. This can be useful for sparse data, small meta-analyses, or for reproducing simplified bivariate models described in the Cochrane Handbook for Diagnostic Test Accuracy Reviews. Allowed values are:
These random-effects simplifications are currently only available for
|
sensspec_constrain |
Optional character vector specifying restrictions on subgroup-specific logit-sensitivity and/or logit-specificity parameters. This can be useful for testing whether subgroup differences are present in sensitivity, specificity, or both. Allowed values are:
Both constraints may be specified simultaneously, e.g.
If |
variances |
Whether the between-study random-effects variance-covariance
matrix should be assumed to be |
conflevel |
Confidence level for confidence intervals. Default is 0.95. |
Value
A list of class "ReitsmaSubgroup" with components:
-
data: the original data set with derived quantities -
glmmTMB_mu: fitted model object with cell means parameterization. -
estimates_mu: parameter estimates with SE with cell means parameterization. -
vcov_mu: variance-covariance matrix with cell means parameterization. -
sensspec: sensitivity and specificity estimates. -
glmmTMB_nu: fitted model object with dummy/reference-cell parameterization -
estimates_nu: parameter estimates with SE with dummy/reference-cell parameterization. -
vcov_nu: variance-covariance matrix with dummy/reference-cell parameterization. -
LRDOR: Diagnostic odds ratios and likelihood ratios. -
RutterGatsonis_recovered: Recovered parameters in the Rutter-Gatsonis (HSROC) parameterization. -
subgroups: The subgroup levels used in the model fit. -
constrain: Random effects parameters fixed at zero. -
variances: Variance structure used in the fitted model.
References
Reitsma, J. B., et al. (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
Rutter, C. M., & Gatsonis, C. A. (2001). A hierarchical regression approach to meta-analysis of diagnostic test accuracy evaluations. Statistics in Medicine, 20(19), 2865–2884. doi:10.1002/sim.942
Harbord, R. M., Deeks, J. J., Egger, M., Whiting, P., & Sterne, J. A. C. (2007). A unification of models for meta-analysis of diagnostic accuracy studies. Biostatistics, 8(2), 239–251. doi:10.1093/biostatistics/kxl004
Examples
data("anticcp")
fit <- fitReitsmaSubgroup(
data = anticcp,
TP = TP,
FP = FP,
FN = FN,
TN = TN,
study = study,
subgroup = generation
)
fit
summary(fit)
Fit the Rutter and Gatsonis (HSROC) model
Description
Fits the hierarchical summary receiver operating characteristic (HSROC) model as proposed by Rutter and Gatsonis for meta-analysis of diagnostic test accuracy (DTA) studies using Template Model Builder (TMB).
Usage
fitRutterGatsonis(
data,
TP,
FP,
FN,
TN,
study,
conflevel = 0.95,
constrain = NULL,
spec = NULL,
verbose = FALSE
)
Arguments
data |
A data.frame containing study-level data. |
TP |
True positives (column name). |
FP |
False positives (column name). |
FN |
False negatives (column name). |
TN |
True negatives (column name). |
study |
Study identifier (column name). |
conflevel |
Confidence level for confidence intervals. Default is 0.95. |
constrain |
Optional character vector specifying model parameters that should be fixed at zero during estimation. This can be useful for sparse data, small meta-analyses, or for reproducing simplified HSROC models described in the Cochrane Handbook for Diagnostic Test Accuracy Reviews. Allowed values are:
Multiple constraints may be specified simultaneously, e.g.
If |
spec |
Optional specificity value at which sensitivity is estimated.
If |
verbose |
Whether TMB optimization output should be printed (default: FALSE). |
Details
The function internally transforms the data into long format and fits the model via maximum likelihood using TMB. Random effects are included for study-specific accuracy and threshold parameters.
Reitsma parameterization is recovered from the fitted HSROC parameters.
The constrain argument allows simplified HSROC models to be
fitted by fixing selected parameters at zero. These constrained models
may improve numerical stability in sparse datasets and can be used to
reproduce several simplified models presented in the Cochrane Handbook
for Diagnostic Test Accuracy Reviews.
Constraints are imposed using parameter mapping within Template Model Builder (TMB), so constrained parameters are excluded from numerical optimization and treated as fixed constants.
Value
An object of class "RutterGatsonis" containing:
- data
Processed input data with derived quantities.
- fit
Optimization result from
nlminb.- sdreport
TMB standard report.
- sdreport2
Summary of reported parameters.
- sensspec
Estimated sensitivity at given specificity with confidence intervals.
- Reitsma_recovered
Recovered parameters in the Reitsma parameterization.
- constrain
Parameters fixed at zero.
Note
Requires a compiled TMB model named "RutterGatsonis".
References
Reitsma, J. B., et al. (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
Rutter, C. M., & Gatsonis, C. A. (2001). A hierarchical regression approach to meta-analysis of diagnostic test accuracy evaluations. Statistics in Medicine, 20(19), 2865–2884. doi:10.1002/sim.942
Harbord, R. M., Deeks, J. J., Egger, M., Whiting, P., & Sterne, J. A. C. (2007). A unification of models for meta-analysis of diagnostic accuracy studies. Biostatistics, 8(2), 239–251. doi:10.1093/biostatistics/kxl004
Examples
data("RF")
fit <- fitRutterGatsonis(
data = RF,
TP = TP,
FP = FP,
FN = FN,
TN = TN,
study = study
)
summary(fit)
Fit the Rutter and Gatsonis Regression Model
Description
Fits a general HSROC meta-regression model using user-supplied design matrices for estimation and prediction.
Usage
fitRutterGatsonisReg(
data,
TP,
FP,
FN,
TN,
study,
Z,
Z_pred = NULL,
map = NULL,
init = NULL,
spec = NULL,
conflevel = 0.95,
verbose = FALSE
)
Arguments
data |
A data.frame containing study-level data. |
TP |
True positives (column name). |
FP |
False positives (column name). |
FN |
False negatives (column name). |
TN |
True negatives (column name). |
study |
Study identifier (column name). |
Z |
Design matrix containing covariate values for model fitting.
The current implementation is intended primarily for study-level
covariates. In the long-format representation, this typically means
that each study is represented by two consecutive rows with identical
covariate values. The number of rows of |
Z_pred |
Prediction design matrix used to obtain covariate-specific
parameter estimates and SROC curves. Each row defines a covariate pattern
at which predictions are evaluated. The number of columns of
|
map |
Optional named list of parameter mappings passed to
Parameter mapping allows selected model parameters to be fixed or constrained during estimation. This can be useful for fitting simplified HSROC models, imposing equality constraints, or reproducing model specifications described in the literature. Each component of This is an advanced feature intended primarily for users familiar with Template Model Builder (TMB). If Example |
init |
Optional list of initial parameter values.
If
The lengths of |
spec |
Optional specificity value or vector of specificity values
at which sensitivity is evaluated for each covariate pattern specified
in |
conflevel |
Confidence level for confidence intervals.
Default is |
verbose |
Logical indicating whether TMB optimization output should
be printed (default: |
Details
This function is intended for advanced users who wish to specify design
matrices directly. The user is responsible for constructing appropriate
design matrices, choosing prediction covariate patterns through
Z_pred, and interpreting or visualizing the resulting regression
model.
By default, all fixed and random effects are initialized at zero.
For difficult optimization problems, user-supplied starting values may be
provided through the init argument.
The fitted model estimates covariate effects on the HSROC accuracy,
threshold, and optionally shape parameters. Predicted sensitivities are
obtained by evaluating the resulting SROC curve(s) at the specificity
value(s) supplied through spec and the covariate patterns defined
by Z_pred.
Value
An object of class "RutterGatsonisReg" containing:
- data
Processed input data with derived quantities.
- fit
Optimization result returned by
nlminb.- sdreport
TMB standard report object.
- sdreport2
Summary of reported model parameters and derived quantities.
- sensspec
Estimated sensitivities at the specified specificity value(s), including confidence intervals.
- constrain
Constraints on parameters applied during model fitting.
Note
Requires a compiled TMB model named "RutterGatsonisReg".
References
Reitsma, J. B., Glas, A. S., Rutjes, A. W. S., Scholten, R. J. P. M., Bossuyt, P. M., & Zwinderman, A. H. (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
Rutter, C. M., & Gatsonis, C. A. (2001). A hierarchical regression approach to meta-analysis of diagnostic test accuracy evaluations. Statistics in Medicine, 20(19), 2865–2884. doi:10.1002/sim.942
Harbord, R. M., Deeks, J. J., Egger, M., Whiting, P., & Sterne, J. A. C. (2007). A unification of models for meta-analysis of diagnostic accuracy studies. Biostatistics, 8(2), 239–251. doi:10.1093/biostatistics/kxl004
Examples
data("RF")
RF2 <- RF[RF$method %in% c("LA","ELISA","Nephelometry"),]
RF2$method <- factor(RF2$method,levels=c("LA","ELISA","Nephelometry"))
Z <- model.matrix(~ method, data = RF2)
Z <- Z[rep(seq_len(nrow(Z)), each = 2), , drop = FALSE]
Z_pred <- matrix(c(1,0,0,1,1,0,1,0,1),ncol=3,nrow=3,byrow=TRUE)
fit <- fitRutterGatsonisReg(
data = RF2,
TP = TP,
FP = FP,
FN = FN,
TN = TN,
study = study,
Z = Z,
Z_pred = Z_pred
)
summary(fit)
Fit the Rutter and Gatsonis Subgroup Model
Description
The function fits an HSROC model with a single categorical study-level covariate (subgroup).
Usage
fitRutterGatsonisSubgroup(
data,
TP,
FP,
FN,
TN,
study,
subgroup,
constrain = NULL,
spec = NULL,
conflevel = 0.95,
verbose = FALSE
)
Arguments
data |
A data.frame containing study-level data. |
TP |
True positives (column name). |
FP |
False positives (column name). |
FN |
False negatives (column name). |
TN |
True negatives (column name). |
study |
Study identifier (column name). |
subgroup |
A single categorical study-level subgroup variable (column name). |
constrain |
Optional character vector specifying model parameters that should be constrained during estimation. This can be useful for sparse data, small meta-analyses, or for reproducing simplified HSROC models described in the Cochrane Handbook for Diagnostic Test Accuracy Reviews. Allowed values are:
Multiple constraints may be specified simultaneously, e.g.
If |
spec |
Optional specificity value or vector of specificity values at which
sensitivity is estimated. If |
conflevel |
Confidence level for confidence intervals. Default is 0.95. |
verbose |
Whether TMB optimization output should be printed (default: FALSE). |
Details
The function fits an HSROC model with a single categorical study-level covariate (subgroup). Separate subgroup effects are estimated for the accuracy and threshold parameters. Optionally, subgroup-specific effects can also be estimated for the shape parameter.
The fitted model returns subgroup-specific summary sensitivity estimates
evaluated at user-specified specificity values. If spec = NULL, the
median observed specificity is used as a proxy.
This function is intended as a convenient wrapper for subgroup analyses
with a single categorical covariate and provides output suitable for
dedicated summary(), plot(), and forest() methods.
Value
An object of class "RutterGatsonisSubgroup" containing:
- data
Processed input data with derived quantities.
- fit
Optimization result from
nlminb.- sdreport
TMB standard report.
- sdreport2
Summary of reported subgroup-specific parameters.
- sensspec
Estimated subgroup-specific sensitivities at the given specificity value(s), with confidence intervals.
- subgroups
The subgroup levels used in the model fit.
- constrain
Constraints on parameters applied during model fitting.
Note
Requires a compiled TMB model named "RutterGatsonisReg".
References
Reitsma, J. B., et al. (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
Rutter, C. M., & Gatsonis, C. A. (2001). A hierarchical regression approach to meta-analysis of diagnostic test accuracy evaluations. Statistics in Medicine, 20(19), 2865–2884. doi:10.1002/sim.942
Harbord, R. M., Deeks, J. J., Egger, M., Whiting, P., & Sterne, J. A. C. (2007). A unification of models for meta-analysis of diagnostic accuracy studies. Biostatistics, 8(2), 239–251. doi:10.1093/biostatistics/kxl004
Examples
data("RF")
fit <- fitRutterGatsonisSubgroup(
data = RF,
TP = TP,
FP = FP,
FN = FN,
TN = TN,
study = study,
subgroup = method
)
summary(fit)
Forest plot generic
Description
Produces coupled forest plots.
Usage
forest(x, ...)
Arguments
x |
Object |
... |
Additional arguments |
Value
No return value. Called for its side effect of producing a plot.
Coupled Forest plot for diagnostic test accuracy meta-analysis
Description
Provides coupled forest plots of sensitivities and specificities with Clopper-Pearson confidence limits.
Usage
## S3 method for class 'Cochrane'
forest(x, conflevel = 0.95, ...)
Arguments
x |
Object of class |
conflevel |
Confidence level for confidence intervals. Default is 0.95. |
... |
Additional graphical arguments (not currently in use) |
Value
No return value. Called for its side effect of producing a plot.
Coupled Forest plot for diagnostic test accuracy meta-analysis
Description
Provides coupled forest plots of sensitivities and specificities with Clopper-Pearson confidence limits.
Usage
## S3 method for class 'CochraneSubgroup'
forest(x, conflevel = 0.95, subgroup_label = "Subgroup", ...)
Arguments
x |
Object of class |
conflevel |
Confidence level for confidence intervals. Default is 0.95. |
subgroup_label |
Column name for the subgroup. Defaults to |
... |
Additional graphical arguments (not currently in use) |
Value
No return value. Called for its side effect of producing a plot.
Compute Initial Parameter Values for Hoyer AFT Models
Description
Computes initial values for the threshold-based bivariate time-to-event model of Hoyer et al. (2018).
Usage
initHoyerAFT(restructured, dist = "loglogistic")
Arguments
restructured |
A data frame in interval format as produced by
|
dist |
Character string specifying the parametric distribution
used in the survival regression models. Must be one of:
|
Details
The function fits separate intercept-only parametric survival models for diseased and non-diseased groups using weighted interval-censored likelihoods. It further derives initial estimates of between-study variability based on study-specific weighted averages of log-thresholds.
To ensure compatibility with survival::survreg, interval bounds
are modified as follows:
Left-censored intervals (
ctype = 1) are assigned a small positive lower bound.Right-censored intervals (
ctype = 3) are assigned an infinite upper bound.
Value
A single-row data frame containing initial parameter values:
- beta0_init
Intercept for non-diseased group
- lambda0_init
Scale parameter for non-diseased group
- beta1_init
Intercept for diseased group
- lambda1_init
Scale parameter for diseased group
- su0_init
Standard deviation of random effects (non-diseased)
- su1_init
Standard deviation of random effects (diseased)
- coru0u1_init
Correlation between random effects
- distcode
Numeric code for the distribution (1 = Weibull, 2 = lognormal, 3 = loglogistic)
References
Hoyer, A., Hirt, S., Kuss, O. (2018). Meta-analysis of full ROC curves using bivariate time-to-event models for interval-censored data. Research Synthesis Methods, 9(1), 62-72. doi:10.1002/jrsm.1273
Examples
data("diabetes")
res <- restructure_data(
data = diabetes,
TP = TP,
FP = FP,
FN = FN,
TN = TN,
threshold = threshold,
study = study,
smallest = 2,
largest = 10
)
init <- initHoyerAFT(res$restructured)
Extract Log-Likelihood from Diagnostic Test Accuracy Models
Description
Returns the maximized log-likelihood for a fitted diagnostic test
accuracy meta-analysis model. The returned value is an object of class
"logLik" and includes the number of estimated parameters (df) and
the number of observations used in model fitting (nobs).
Usage
## S3 method for class 'RutterGatsonis'
logLik(object, ...)
## S3 method for class 'RutterGatsonisSubgroup'
logLik(object, ...)
## S3 method for class 'RutterGatsonisReg'
logLik(object, ...)
## S3 method for class 'HoyerAFT'
logLik(object, ...)
## S3 method for class 'Reitsma'
logLik(object, ...)
## S3 method for class 'ReitsmaSubgroup'
logLik(object, ...)
Arguments
object |
A fitted model object. |
... |
Not used. |
Value
An object of class "logLik".
See Also
Plot Results from a Hoyer Model
Description
Produces a hierarchical summary receiver operating characteristic (HSROC) plot from a fitted Hoyer AFT model. The plot shows study-level sensitivity and specificity estimates together with the meta-analytic HSROC curve derived from the fitted model.
Usage
## S3 method for class 'HoyerAFT'
plot(
x,
scale = 0.02,
size = c("equal", "sampsize", "se"),
thresholdrange = NULL,
main = "Diagnostic Test Accuracy Meta-Analysis",
...
)
Arguments
x |
An object of class
|
scale |
A numeric scaling factor controlling the size of the
rectangles representing study weights. Default is |
size |
Character string controlling study weight display:
|
thresholdrange |
A numeric vector of length 2 giving the range of
threshold over which sensitivities and specificities are predicted
If |
main |
Character string giving the main title of the plot.
Defaults to |
... |
Additional graphical arguments (currently unused). |
Details
The plot includes:
Study-specific sensitivity and false positive rate estimates
Rectangular markers representing study observations
Lines connecting thresholds within studies
A meta-analytic HSROC curve based on the fitted AFT model
The HSROC curve is constructed using the estimated model parameters and depends on the specified distribution:
Weibull
Lognormal
Loglogistic
The plot is constructed on the ROC scale with sensitivity on the y-axis and specificity on the x-axis (displayed as 1 - false positive rate on a reversed axis).
Value
No return value. Called for its side effect of producing a plot.
See Also
Plot Results from a Reitsma Model
Description
Produces a summary ROC plot for objects of class "Reitsma"
obtained from fitReitsma. The plot displays study-level
estimates of sensitivity and specificity, the summary operating point,
and corresponding confidence and prediction regions. Optionally, the
HSROC (hierarchical summary ROC) curve can be overlaid.
Usage
## S3 method for class 'Reitsma'
plot(
x,
scale = 0.02,
size = c("fisher", "equal", "sampsize", "se"),
main = "Diagnostic Test Accuracy Meta-Analysis",
HSROC = FALSE,
specrange = c(0.7, 0.995),
conflevel = 0.95,
predlevel = 0.95,
...
)
Arguments
x |
An object of class |
scale |
A numeric scaling factor controlling the size of the
rectangles representing study weights. Default is |
size |
Character string controlling study weight display:
|
main |
Character string giving the main title of the plot.
Defaults to |
HSROC |
if |
specrange |
A numeric vector of length 2 giving the range of
specificities over which the HSROC curve is plotted.
Defaults to |
conflevel |
Confidence level for the confidence region. Default is |
predlevel |
Confidence level for the prediction region. Default is |
... |
Additional graphical arguments passed to plotting functions. |
Details
The plot is constructed on the ROC scale with sensitivity on the y-axis and specificity on the x-axis (displayed as 1 - false positive rate on a reversed axis).
Study-specific estimates are shown as rectangles, where the size reflects approximate study weights derived from the Fisher information matrix.
The following elements are displayed:
Study-level sensitivity and specificity estimates
Summary (pooled) estimate
confidence region around the summary point
prediction region reflecting between-study variability
Optional HSROC curve (if
HSROC = TRUE)
Confidence and prediction regions are derived using the delta method based on the estimated variance-covariance structure of the model.
Value
No return value. Called for its side effect of producing a plot.
References
Freeman, S. C., Kerby, C. R., Patel, A., Cooper, N. J., Quinn, T., & Sutton, A. J. (2019). Development of an interactive web-based tool to conduct and interrogate meta-analysis of diagnostic test accuracy studies: MetaDTA. BMC Medical Research Methodology, 19, 81. doi:10.1186/s12874-019-0724-x
Harbord, R. M., Deeks, J. J., Egger, M., Whiting, P., & Sterne, J. A. C. (2007). A unification of models for meta-analysis of diagnostic accuracy studies. Biostatistics, 8(2), 239–251. doi:10.1093/biostatistics/kxl004
Riley, R. D., Ensor, J., Jackson, D., & Burke, D. L. (2018). Deriving percentage study weights in multi-parameter meta-analysis models: with application to meta-regression, network meta-analysis and one-stage individual participant data models. Statistical Methods in Medical Research, 27(10), 2885–2905. doi:10.1177/0962280216688033
See Also
Plot Results from a Reitsma Subgroup Model
Description
Produces a summary ROC plot for objects of class "ReitsmaSubgroup"
obtained from fitReitsmaSubgroup. The plot displays study-level
estimates of sensitivity and specificity, the summary operating point,
and corresponding confidence and prediction regions. Optionally, the
HSROC (hierarchical summary ROC) curve can be overlaid.
Usage
## S3 method for class 'ReitsmaSubgroup'
plot(
x,
scale = 0.02,
size = c("equal", "sampsize", "se"),
main = "Diagnostic Test Accuracy Meta-Analysis",
col = NULL,
nudge_legend = -0.4,
HSROC = FALSE,
specrange = c(0.7, 0.995),
conflevel = 0.95,
predlevel = 0.95,
connectstudies = FALSE,
...
)
Arguments
x |
An object of class |
scale |
A numeric scaling factor controlling the size of the
rectangles representing study weights. Default is |
size |
Character string controlling study weight display:
|
main |
Character string giving the main title of the plot.
Defaults to |
col |
Vector of colours used for subgroup-specific HSROC curves,
study-level rectangles, summary points, confidence and prediction region.
If |
nudge_legend |
Numeric horizontal offset for the subgroup legend.
More negative values move the legend further right, outside the plotting area.
Values closer to zero move it closer to the panel. Default is |
HSROC |
if |
specrange |
A numeric vector of length 2 giving the range of
specificities over which the HSROC curve is plotted.
Defaults to |
conflevel |
Confidence level for the confidence region. Default is |
predlevel |
Confidence level for the prediction region. Default is |
connectstudies |
Whether the point estimates (rectangles) of two subgroups
within the same study should be connected. Defaults to |
... |
Additional graphical arguments passed to plotting functions. |
Details
The plot is constructed on the ROC scale with sensitivity on the y-axis and specificity on the x-axis (displayed as 1 - false positive rate on a reversed axis).
Study-specific estimates are shown as rectangles, where the size reflects approximate study weights derived from the Fisher information matrix.
The following elements are displayed:
Study-level sensitivity and specificity estimates
Summary (pooled) estimate
confidence region around the summary point
prediction region reflecting between-study variability
Optional HSROC curve (if
HSROC = TRUE)
Confidence and prediction regions are derived using the delta method based on the estimated variance-covariance structure of the model.
Value
No return value. Called for its side effect of producing a plot.
References
Harbord, R. M., Deeks, J. J., Egger, M., Whiting, P., & Sterne, J. A. C. (2007). A unification of models for meta-analysis of diagnostic accuracy studies. Biostatistics, 8(2), 239–251. doi:10.1093/biostatistics/kxl004
See Also
Plot Results from a Rutter and Gatsonis Model
Description
Produces a summary ROC plot for objects of class "RutterGatsonis"
obtained from fitRutterGatsonis. The plot displays study-level
estimates of sensitivity and specificity and the
HSROC (hierarchical summary ROC).
Usage
## S3 method for class 'RutterGatsonis'
plot(
x,
scale = 0.02,
size = c("equal", "sampsize", "se"),
specrange = c(0.7, 0.995),
main = "Diagnostic Test Accuracy Meta-Analysis",
...
)
Arguments
x |
An object of class |
scale |
A numeric scaling factor controlling the size of the
rectangles representing study weights. Default is |
size |
Character string controlling study weight display:
|
specrange |
A numeric vector of length 2 giving the range of
specificities over which the HSROC curve is plotted.
Defaults to |
main |
Character string giving the main title of the plot.
Defaults to |
... |
Additional graphical arguments passed to plotting functions. |
Details
The plot is constructed on the ROC scale with sensitivity on the y-axis and specificity on the x-axis (displayed as 1 - false positive rate on a reversed axis).
Study-specific estimates are shown as rectangles.
The following elements are displayed:
Study-level sensitivity and specificity estimates
HSROC curve
Value
No return value. Called for its side effect of producing a plot.
References
Freeman, S. C., Kerby, C. R., Patel, A., Cooper, N. J., Quinn, T., & Sutton, A. J. (2019). Development of an interactive web-based tool to conduct and interrogate meta-analysis of diagnostic test accuracy studies: MetaDTA. BMC Medical Research Methodology, 19, 81. doi:10.1186/s12874-019-0724-x
See Also
Plot Results from a Rutter and Gatsonis Subgroup Model
Description
Produces summary ROC plots for objects of class "RutterGatsonisSubgroup"
obtained from fitRutterGatsonisSubgroup. The plot displays
study-level estimates of sensitivity and specificity, stratified by subgroup,
together with subgroup-specific HSROC (hierarchical summary ROC) curves.
Usage
## S3 method for class 'RutterGatsonisSubgroup'
plot(
x,
scale = 0.02,
size = c("equal", "sampsize", "se"),
nudge_legend = -0.4,
specrange = c(0.7, 0.995),
col = NULL,
main = "Diagnostic Test Accuracy Meta-Analysis",
connectstudies = FALSE,
...
)
Arguments
x |
An object of class |
scale |
A numeric scaling factor controlling the size of the
rectangles representing study weights. Default is |
size |
Character string controlling study weight display:
|
nudge_legend |
Numeric horizontal offset for the subgroup legend.
More negative values move the legend further right, outside the plotting area.
Values closer to zero move it closer to the panel. Default is |
specrange |
A numeric vector of length 2 giving the range of
specificities over which the HSROC curve is plotted.
Defaults to |
col |
Vector of colours used for subgroup-specific HSROC curves
and study-level rectangles. If |
main |
Character string giving the main title of the plot.
Defaults to |
connectstudies |
Whether the point estimates (rectangles) of two subgroups
within the same study should be connected. Defaults to |
... |
Additional graphical arguments passed to plotting functions. |
Details
The plot is constructed on the ROC scale with sensitivity on the y-axis and specificity on the x-axis (displayed as 1 - false positive rate on a reversed axis).
Study-specific estimates are shown as rectangles, with subgroup-specific colours.
The following elements are displayed:
Study-level sensitivity and specificity estimates by subgroup
Subgroup-specific HSROC curves
A legend identifying the subgroups
Value
No return value. Called for its side effect of producing a plot.
References
Freeman, S. C., Kerby, C. R., Patel, A., Cooper, N. J., Quinn, T., & Sutton, A. J. (2019). Development of an interactive web-based tool to conduct and interrogate meta-analysis of diagnostic test accuracy studies: MetaDTA. BMC Medical Research Methodology, 19, 81. doi:10.1186/s12874-019-0724-x
See Also
Print Hoyer AFT Model Object
Description
Displays a concise summary of a fitted Hoyer AFT model, including distribution, number of studies, convergence status, and likelihood-based fit statistics.
Usage
## S3 method for class 'HoyerAFT'
print(x, ...)
Arguments
x |
An object of class |
... |
Further arguments (unused). |
Value
Invisibly returns the input object.
See Also
Print Method for Reitsma Objects
Description
Displays a concise summary of a fitted Reitsma diagnostic test accuracy model, including number of studies, convergence status and likelihood-based fit statistics.
Usage
## S3 method for class 'Reitsma'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
Invisibly returns the input object.
See Also
Print Method for ReitsmaSubgroup Objects
Description
Displays a concise summary of a fitted Reitsma Subgroup diagnostic test accuracy model, including number of studies, convergence status, and likelihood-based fit statistics.
Usage
## S3 method for class 'ReitsmaSubgroup'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
Invisibly returns the input object.
See Also
Print Method for RutterGatsonis Objects
Description
Displays a concise summary of a fitted HSROC model, including number of studies, convergence status, and likelihood-based fit statistics.
Usage
## S3 method for class 'RutterGatsonis'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
Invisibly returns the input object.
See Also
Print Method for RutterGatsonisReg Objects
Description
Displays a concise summary of a fitted HSROC model, including number of studies, convergence status, and likelihood-based fit statistics.
Usage
## S3 method for class 'RutterGatsonisReg'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
Invisibly returns the input object.
See Also
Print Method for RutterGatsonisSubgroup Objects
Description
Displays a concise summary of a fitted HSROC model, including number of studies, convergence status, and likelihood-based fit statistics.
Usage
## S3 method for class 'RutterGatsonisSubgroup'
print(x, ...)
Arguments
x |
An object of class |
... |
Additional arguments (unused). |
Value
Invisibly returns the input object.
See Also
summary.RutterGatsonisSubgroup
Construct Interval Data for Threshold-Based Bivariate Time-to-Event Models
Description
Transforms study-level diagnostic test accuracy (DTA) data with multiple thresholds into interval-censored format suitable for likelihood-based modelling (Hoyer et al., 2018).
Usage
restructure_data(
data,
TP,
FP,
FN,
TN,
threshold,
study,
smallest,
largest,
testdirection = c("greater", "less")
)
Arguments
data |
A data.frame containing study-level data. |
TP |
True positives (column name). |
FP |
False positives (column name). |
FN |
False negatives (column name). |
TN |
True negatives (column name). |
threshold |
The observed threshold value (column name). Must be positive and strictly increasing within each study. |
study |
Study identifier (column name). |
smallest |
Positive lower bound used to define the
leftmost interval. Must be smaller than minimum |
largest |
Positive upper bound used to define the
rightmost interval. Must be greater than maximum |
testdirection |
Direction of the test. Enter |
Details
The function constructs:
A left-censored interval (below the first threshold)
Intermediate intervals between adjacent thresholds
A right-censored interval (above the last threshold)
Event counts are derived from cumulative counts to represent the number of observations falling within each interval for diseased and non-diseased groups. Therefore, input counts must be cumulative over increasing thresholds within each study.
The function first validates that counts are numeric, non-negative integers and that threshold values are positive.
Within each study, total numbers of diseased (n1) and
non-diseased (n0) individuals are required to be constant across
thresholds. Intermediate interval counts are computed as differences
between cumulative counts.
The log-scale midpoint (lcutmean) is provided to support
initialization of random effects in subsequent Hoyer AFT models.
For testdirection = "greater", the function assumes that sensitivity
decreases and specificity increases with increasing thresholds. For
testdirection = "less", the reverse monotonicity is required.
Internally, the function standardizes the definition of a positive test
result so that it always corresponds to values above the threshold. For
testdirection = "less", this is achieved by relabeling the observed
counts. This does not affect the resulting sensitivity, specificity, or ROC
curve, but ensures compatibility with the model formulation.
Value
A list with two components:
- restructured
A data frame with one row per constructed interval containing:
- study
Study identifier
- TP, TN, n1, n0
Original counts carried forward
- threshold
Threshold associated with the interval
- lowerB
Lower interval bound (NA for left-censored)
- upperB
Upper interval bound (NA for right-censored)
- events1
Number of diseased observations in the interval
- events0
Number of non-diseased observations in the interval
- ctype
Censoring type (1 = left, 2 = interval, 3 = right)
- lcutmean
Midpoint of log-thresholds defining the interval
- original
The processed original data including (derived) quantities:
- n1
Total number of diseased individuals (TP + FN)
- n0
Total number of non-diseased individuals (TN + FP)
- sens
Sensitivity (TP / n1)
- spec
Specificity (TN / n0)
- fpr
False positive rate (FP / n0)
- testdirection
As specified by
testdirection
References
Hoyer, A., Hirt, S., Kuss, O. (2018). Meta-analysis of full ROC curves using bivariate time-to-event models for interval-censored data. Research Synthesis Methods, 9(1), 62-72. doi:10.1002/jrsm.1273
Examples
data("diabetes")
res <- restructure_data(
data = diabetes,
TP = TP,
FP = FP,
FN = FN,
TN = TN,
threshold = threshold,
study = study,
smallest = 2,
largest = 10
)
Schuetz dataset
Description
This is the schuetz data set from Schuetz (2010) from a meta-analyis of non-invasive coronary angiography using computer tomography (CT) versus magnetic resonance imaging (MRI)
Usage
schuetz
Format
A data frame with 108 rows and 7 variables:
- test
Which test was used, CT or MRI
- study
Study identifier
- TP
Number of true positives
- FP
Number of false positives
- FN
Number of false negatives
- TN
Number of true negatives
- indirect
whether the comparison is indirect (=1) or direct (=0)
Source
Schuetz, K., et al. (2010). Meta‐analysis: noninvasive coronary angiography using computed tomography versus magnetic resonance imaging. Annals of Internal Medicine, 152(3), 167-177. doi:10.7326/0003-4819-152-3-201002020-00008
Summary Method for HoyerAFT Objects
Description
Extracts and returns the summary information stored in a fitted
HoyerAFT model object.
Usage
## S3 method for class 'HoyerAFT'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (currently unused). |
Details
This method is part of the standard S3 summary() generic and
provides access to summary statistics computed from the fitted model,
as stored in the sdreport2 and sensspec component of the object.
Value
A list with two data frames containing summary statistics derived from the fitted model.
-
sdreport2: Parameter estimates with standard errors as returned from TMB reported parameters. -
sensspec: Estimated sensitivity and specificity with confidence intervals at the specified thresholds.
See Also
Summary Method for Reitsma Objects
Description
Extracts key results from an object of class "Reitsma", including
parameter estimates, sensitivity and specificity summaries, and recovered
HSROC parameters from the Rutter–Gatsonis parameterization.
Usage
## S3 method for class 'Reitsma'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (currently ignored). |
Value
A list with the following components:
-
estimates: Parameter estimates with standard errors. -
sensspec: Estimated sensitivity and specificity with confidence intervals. -
RutterGatsonis_recovered: Recovered parameters in the Rutter-Gatsonis (HSROC) parameterization.
See Also
Summary Method for ReitsmaSubgroup Objects
Description
Extracts key results from an object of class "ReitsmaSubgroup", including
parameter estimates, sensitivity and specificity summaries, and recovered
HSROC parameters from the Rutter–Gatsonis parameterization.
Usage
## S3 method for class 'ReitsmaSubgroup'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (currently ignored). |
Value
A list with the following components:
-
estimates: Parameter estimates with standard errors. -
sensspec: Estimated sensitivity and specificity with confidence intervals. -
RutterGatsonis_recovered: Recovered parameters in the Rutter-Gatsonis (HSROC) parameterization. -
subgroupsSubgroup names.
See Also
Summary Method for RutterGatsonis Objects
Description
This method extracts key components from a fitted HSROC model object
returned by fitRutterGatsonis. It returns parameter
estimates, sensitivity/specificity summaries, and the recovered
Reitsma parametrization.
Usage
## S3 method for class 'RutterGatsonis'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (currently unused). |
Details
Provides a concise summary of a fitted "RutterGatsonis" model.
Value
A list containing the following components:
-
estimatesParameter estimates with standard errors as returned from TMB reported parameters. -
sensspecEstimated sensitivity at the specified specificity, including confidence intervals. -
Reitsma_recoveredRecovered parameters in the Reitsma parameterization.
See Also
Summary Method for RutterGatsonisReg Objects
Description
This method extracts key components from a fitted HSROC model object
returned by fitRutterGatsonisReg. It returns parameter
estimates, sensitivity/specificity summaries.
Usage
## S3 method for class 'RutterGatsonisReg'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (currently unused). |
Details
Provides a concise summary of a fitted "RutterGatsonisReg" model.
Value
A list containing the following components:
-
estimatesParameter estimates with standard errors as returned from TMB reported parameters. -
sensspecEstimated sensitivity at the specified specificity, including confidence intervals.
See Also
Summary Method for RutterGatsonisSubgroup Objects
Description
This method extracts key components from a fitted HSROC model object
returned by fitRutterGatsonisSubgroup. It returns parameter
estimates and sensitivity/specificity summaries.
Usage
## S3 method for class 'RutterGatsonisSubgroup'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (currently unused). |
Details
Provides a concise summary of a fitted "RutterGatsonisSubgroup" model.
Value
A list containing the following components:
-
estimatesParameter estimates with standard errors as returned from TMB reported parameters. -
sensspecEstimated sensitivity at the specified specificity, including confidence intervals. -
Reitsma_recoveredRecovered parameters in the Reitsma parameterization. -
subgroupsSubgroup names.