The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Package {dtametaTMB}


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

Main workflow

Included datasets

See the package vignettes for worked examples and model descriptions.

Author(s)

Maintainer: Claus Nowak claus.nowak@donau-uni.ac.at

Authors:


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 "Chisq" is supported.

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

logLik(), anova()


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 ReitsmaSubgroup and RutterGatsonisSubgroup objects.

Externally_Calculated_Parameters

Revman model/parameter types.

Parameter

RevMan parameter name.

Estimate

Parameter estimate.

The returned table contains the model parameters displayed by RevMan:

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:

  1. Restructuring of threshold-based data into interval format

  2. Estimation of initial parameter values

  3. 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 threshold.

largest

Positive upper bound used to define the rightmost interval. Must be greater than maximum threshold.

testdirection

Direction of the test. Enter "greater" when larger test values indicate disease. Conversely, enter "less" when lower test values indicate disease (e.g. anaemia-type tests). Defaults to "greater".

eval_threshold

Optional numeric value or vector specifying the prediction grid threshold(s) at which sensitivity and specificity should be evaluated. If NULL (default), the median threshold from the original data is used.

conflevel

Confidence level for confidence intervals for sensitivities and specificities at the chosen thresholds. Defaults to 0.95.

dist

Character string specifying the parametric distribution for the AFT model. One of "weibull", "lognormal", or "loglogistic" (default).

verbose

Whether TMB optimization output should be printed (default: FALSE).

...

Additional arguments passed to fitHoyerAFT.

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:

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 restructure_data, containing:

restructured

Interval-formatted data

original

Processed original data with derived quantities

init

A data frame of initial parameter values as produced by initHoyerAFT.

conflevel

Confidence level for confidence intervals for sensitivities and specificities at the chosen thresholds. Defaults to 0.95.

eval_threshold

Optional numeric value or vector specifying the prediction grid threshold(s) at which sensitivity and specificity should be evaluated. If NULL (default), the median threshold from the original data is used.

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:

NULL

The standard unconstrained Reitsma model is fitted.

"sigma_AB"

The covariance between logit-sensitivity and logit-specificity random effects is fixed at zero. Random effects remain independent.

"sigma2_A"

The between-study variance of logit-sensitivity is fixed at zero. This also implies a zero covariance.

"sigma2_B"

The between-study variance of logit-specificity is fixed at zero. This also implies a zero covariance.

"all"

All random-effects variance and covariance parameters are fixed at zero, resulting in a fixed-effects model.

conflevel

Confidence level for confidence intervals. Default is 0.95.

Value

A list of class "Reitsma" with components:

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:

NULL

The standard unconstrained Reitsma model is fitted.

"sigma_AB"

The covariance between logit-sensitivity and logit-specificity random effects is fixed at zero. Random effects remain independent.

"sigma2_A"

The between-study variance of logit-sensitivity is fixed at zero. This also implies a zero covariance.

"sigma2_B"

The between-study variance of logit-specificity is fixed at zero. This also implies a zero covariance.

"all"

All random-effects variance and covariance parameters are fixed at zero, resulting in a fixed-effects model.

These random-effects simplifications are currently only available for variances="common".

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:

"sens"

Constrain all subgroup-specific logit-sensitivity parameters to be equal. Subgroup differences are therefore only allowed in logit-specificity.

"spec"

Constrain all subgroup-specific logit-specificity parameters to be equal. Subgroup differences are therefore only allowed in logit-sensitivity.

Both constraints may be specified simultaneously, e.g. sensspec_constrain = c("sens", "spec"), which forces all subgroup-specific sensitivity and specificity parameters to be equal across subgroups.

If NULL (default), separate sensitivity and specificity parameters are estimated for each subgroup.

variances

Whether the between-study random-effects variance-covariance matrix should be assumed to be "common" (default) or "unequal" across subgroups. If "common", a single between-study variance-covariance matrix is estimated and shared across all subgroups. If "unequal", subgroup-specific variance-covariance matrices are estimated.

conflevel

Confidence level for confidence intervals. Default is 0.95.

Value

A list of class "ReitsmaSubgroup" with components:

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:

"sigma2_alpha"

Fix the between-study variance of the HSROC accuracy random effect at zero.

"sigma2_theta"

Fix the between-study variance of the HSROC threshold random effect at zero.

"shape"

Fix the HSROC shape parameter (beta) at zero, resulting in a symmetric summary ROC curve.

Multiple constraints may be specified simultaneously, e.g. constrain = c("sigma2_alpha", "shape").

If NULL (default), the unconstrained HSROC model is fitted.

spec

Optional specificity value at which sensitivity is estimated. If NULL, the median observed specificity is used as a proxy.

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 must equal twice the number of studies.

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 Z_pred must equal the number of columns of Z. If NULL (default), a single row of zeros is used. For meaningful predictions, users will typically want to specify Z_pred explicitly.

map

Optional named list of parameter mappings passed to MakeADFun.

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 map should be a factor vector with the same length as the corresponding parameter. Parameters assigned NA levels are fixed at their initial values supplied via the init argument, whereas parameters sharing the same factor level are estimated as equal.

This is an advanced feature intended primarily for users familiar with Template Model Builder (TMB).

If NULL (default), all model parameters are estimated freely.

Example map = list(shape_coef=factor(c(1, rep(NA, ncol(Z) - 1)))).

init

Optional list of initial parameter values. If NULL (default), all fixed and random effects are initialized to zero. Advanced users may provide a named list containing:

accuracy_coef

Initial values for the accuracy regression coefficients.

threshold_coef

Initial values for the threshold regression coefficients.

shape_coef

Initial values for the shape regression coefficients.

log_sigma_alpha

Initial value for the log standard deviation of the accuracy random effects.

log_sigma_theta

Initial value for the log standard deviation of the threshold random effects.

alpha

Initial values for the study-specific accuracy random effects.

theta

Initial values for the study-specific threshold random effects.

The lengths of accuracy_coef, threshold_coef, and shape_coef must equal the number of columns in Z. The lengths of alpha and theta must equal the number of studies.

spec

Optional specificity value or vector of specificity values at which sensitivity is evaluated for each covariate pattern specified in Z_pred. If NULL, the median observed specificity is used.

conflevel

Confidence level for confidence intervals. Default is 0.95.

verbose

Logical indicating whether TMB optimization output should be printed (default: FALSE).

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:

"sigma2_alpha"

Fix the between-study variance of the HSROC accuracy random effect at zero.

"sigma2_theta"

Fix the between-study variance of the HSROC threshold random effect at zero.

"accuracy"

No subgroup effect on accuracy.

"threshold"

No subgroup effect on threshold.

"shape"

No subgroup effect on shape.

"shape_zero"

All shape parameters (beta's) are fixed at zero.

Multiple constraints may be specified simultaneously, e.g. constrain = c("sigma2_alpha", "shape").

shape_zero overrides shape.

If NULL (default), the unconstrained HSROC model is fitted.

spec

Optional specificity value or vector of specificity values at which sensitivity is estimated. If NULL, the median observed specificity is used as a proxy.

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 "Cochrane" such as "RutterGatsonis", "Reitsma" or "HoyerAFT"

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 "CochraneSubgroup" such as "RutterGatsonisSubgroup", "ReitsmaSubgroup"

conflevel

Confidence level for confidence intervals. Default is 0.95.

subgroup_label

Column name for the subgroup. Defaults to "Subgroup".

...

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 restructure_data (specifically the restructured component of its output). Must contain the columns:

study

Study identifier

lowerB

Lower interval bound

upperB

Upper interval bound

events0

Non-diseased counts within interval

events1

Diseased counts within interval

ctype

Censoring type (1 = left, 2 = interval, 3 = right)

lcutmean

Midpoint of log-threshold interval

dist

Character string specifying the parametric distribution used in the survival regression models. Must be one of: "weibull", "lognormal", or "loglogistic". Default is "loglogistic".

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:

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

anova.dtametaTMB()


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 "HoyerAFT" as returned by fitHoyerAFT. Must contain:

original

Original processed data including sensitivity (sens) and false positive rate (fpr)

sdreport2

Summary of model parameters

distcode

Distribution code (1 = Weibull, 2 = lognormal, 3 = loglogistic)

scale

A numeric scaling factor controlling the size of the rectangles representing study weights. Default is 0.02.

size

Character string controlling study weight display:

"equal"

All studies shown with equal size. Default

"sampsize"

Size proportional to sample size

"se"

Size proportional to precision on the logit scale

thresholdrange

A numeric vector of length 2 giving the range of threshold over which sensitivities and specificities are predicted If NULL (default), then the minimum and maximum thresholds from the data are used.

main

Character string giving the main title of the plot. Defaults to "Diagnostic Test Accuracy Meta-Analysis".

...

Additional graphical arguments (currently unused).

Details

The plot includes:

The HSROC curve is constructed using the estimated model parameters and depends on the specified distribution:

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

fitHoyerAFT fitHoyer


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 "Reitsma", as returned by fitReitsma.

scale

A numeric scaling factor controlling the size of the rectangles representing study weights. Default is 0.02.

size

Character string controlling study weight display:

"fisher"

Size proportional to a decomposition of Fisher's Information matrix. Default.

"equal"

All studies shown with equal size

"sampsize"

Size proportional to sample size

"se"

Size proportional to precision on the logit scale

main

Character string giving the main title of the plot. Defaults to "Diagnostic Test Accuracy Meta-Analysis".

HSROC

if TRUE, the HSROC curve is added to the plot. Default is FALSE.

specrange

A numeric vector of length 2 giving the range of specificities over which the HSROC curve is plotted. Defaults to c(0.7, 0.995).

conflevel

Confidence level for the confidence region. Default is 0.95.

predlevel

Confidence level for the prediction region. Default is 0.95.

...

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:

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

fitReitsma


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 "ReitsmaSubgroup", as returned by fitReitsmaSubgroup.

scale

A numeric scaling factor controlling the size of the rectangles representing study weights. Default is 0.02.

size

Character string controlling study weight display:

"equal"

All studies shown with equal size. Default

"sampsize"

Size proportional to sample size

"se"

Size proportional to precision on the logit scale

main

Character string giving the main title of the plot. Defaults to "Diagnostic Test Accuracy Meta-Analysis".

col

Vector of colours used for subgroup-specific HSROC curves, study-level rectangles, summary points, confidence and prediction region. If NULL, colours are generated automatically.

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 -0.4.

HSROC

if TRUE, the HSROC curve is added to the plot. Default is FALSE.

specrange

A numeric vector of length 2 giving the range of specificities over which the HSROC curve is plotted. Defaults to c(0.7, 0.995).

conflevel

Confidence level for the confidence region. Default is 0.95.

predlevel

Confidence level for the prediction region. Default is 0.95.

connectstudies

Whether the point estimates (rectangles) of two subgroups within the same study should be connected. Defaults to FALSE.

...

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:

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

fitReitsmaSubgroup


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 "RutterGatsonis", as returned by fitRutterGatsonis.

scale

A numeric scaling factor controlling the size of the rectangles representing study weights. Default is 0.02.

size

Character string controlling study weight display:

"equal"

All studies shown with equal size. Default

"sampsize"

Size proportional to sample size

"se"

Size proportional to precision on the logit scale

specrange

A numeric vector of length 2 giving the range of specificities over which the HSROC curve is plotted. Defaults to c(0.7, 0.995).

main

Character string giving the main title of the plot. Defaults to "Diagnostic Test Accuracy Meta-Analysis".

...

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:

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

fitRutterGatsonis


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 "RutterGatsonisSubgroup", as returned by fitRutterGatsonisSubgroup.

scale

A numeric scaling factor controlling the size of the rectangles representing study weights. Default is 0.02.

size

Character string controlling study weight display:

"equal"

All studies shown with equal size. Default.

"sampsize"

Size proportional to sample size.

"se"

Size proportional to precision on the logit scale.

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 -0.4.

specrange

A numeric vector of length 2 giving the range of specificities over which the HSROC curve is plotted. Defaults to c(0.7, 0.995).

col

Vector of colours used for subgroup-specific HSROC curves and study-level rectangles. If NULL, colours are generated automatically.

main

Character string giving the main title of the plot. Defaults to "Diagnostic Test Accuracy Meta-Analysis".

connectstudies

Whether the point estimates (rectangles) of two subgroups within the same study should be connected. Defaults to FALSE.

...

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:

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

fitRutterGatsonisSubgroup


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 "HoyerAFT".

...

Further arguments (unused).

Value

Invisibly returns the input object.

See Also

summary.HoyerAFT


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 "Reitsma".

...

Additional arguments (unused).

Value

Invisibly returns the input object.

See Also

summary.Reitsma


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 "ReitsmaSubgroup".

...

Additional arguments (unused).

Value

Invisibly returns the input object.

See Also

summary.ReitsmaSubgroup


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 "RutterGatsonis".

...

Additional arguments (unused).

Value

Invisibly returns the input object.

See Also

summary.RutterGatsonis


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 "RutterGatsonisReg".

...

Additional arguments (unused).

Value

Invisibly returns the input object.

See Also

summary.RutterGatsonisReg


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 "RutterGatsonisSubgroup".

...

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 threshold.

largest

Positive upper bound used to define the rightmost interval. Must be greater than maximum threshold.

testdirection

Direction of the test. Enter "greater" when larger test values indicate disease. Conversely, enter "less" when lower test values indicate disease (e.g. anaemia-type tests). Defaults to "greater".

Details

The function constructs:

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 "HoyerAFT", typically the result of a call to fitHoyerAFT.

...

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.

See Also

fitHoyer fitHoyerAFT


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 "Reitsma" as returned by fitReitsma.

...

Additional arguments (currently ignored).

Value

A list with the following components:

See Also

fitReitsma


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 "ReitsmaSubgroup" as returned by fitReitsmaSubgroup.

...

Additional arguments (currently ignored).

Value

A list with the following components:

See Also

fitReitsmaSubgroup


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 "RutterGatsonis" as returned by fitRutterGatsonis.

...

Additional arguments (currently unused).

Details

Provides a concise summary of a fitted "RutterGatsonis" model.

Value

A list containing the following components:

See Also

fitRutterGatsonis


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 "RutterGatsonisReg" as returned by fitRutterGatsonisReg.

...

Additional arguments (currently unused).

Details

Provides a concise summary of a fitted "RutterGatsonisReg" model.

Value

A list containing the following components:

See Also

fitRutterGatsonisReg


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 "RutterGatsonisSubgroup" as returned by fitRutterGatsonisSubgroup.

...

Additional arguments (currently unused).

Details

Provides a concise summary of a fitted "RutterGatsonisSubgroup" model.

Value

A list containing the following components:

See Also

fitRutterGatsonisSubgroup

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.