*! version 1.0.0 4dec2017

Title

metadta -- Fixed-effects and random-effects meta-analysis, meta-regression and network meta-analysis
of diagnostic test accuracy studies using logistic and logistic-normal regression.

Syntax

[by varlist:] metadta tp fp fn tn [tp2 fp2 fn2 tn2 index comparator] [indepvars] [if] [in] ,
studyid(varname)
[options foptions
soptions]

studyid is a variable identifying each study.

indepvars should be string for categorical variables and/or numeric for continous variables.
The variable names should not contain underscores.

Description

metadta implements a generalized linear mixed model for the binomial family
with a logit link.

By default a random-effects model accounting for the correlation between logit sensitivity and logit specif is fitted. A fixed-effects model is automatically used when the correlation cannot be
computed due to insufficient data i.e when there are less than 3 or whenever it is plausible to assume that the studies are homogeneous.

Four different types of analysis can be performed.

1. The basic analysis requires data from independent studies where each row contains data from seperate studies.

2. Comparative analysis where each studies each study contributes two rows to the dataset; one for each test. The two tests are similar in all studies.

3. Arm-based network meta-analysis where a study contributes more two rows to the dataset; one for each tests. Different tests can be used in different studies.

4. Contrast-based network meta-analysis where each study contributes at least one row of dataset, with each row containing data for each comparison between an index/candidate and a comparator test(s).

The model parameters are further processed and results presented in tables, forest plot and/or SROC plot. After a comparative meta-analysis or contrast-based network meta-analysis, the study-specific relative sensitivity and specificity can be tabulated and/or plotted.

When there are no covariates, heterogeneity is also quantified using the I-squared measure(Zhou and Dendukuri 2014).

Note 1 We recommend going through our published tutorial. Find it here: https://archpublichealth.biomedcentral.com/articles/10.1186/s13690-021-00747-5

Note 2 The Stata do file to reproduce the examples in the tutorial can be found here: https://github.com/VNyaga/Metadta/blob/master/NyagaArbyn2022ArchPubHealth.do

Modeling

model(random|fixed [, modelopts]) the type of model to fit; default is random. modelopts
control the control the optimization process

cov(metadta##vartype:bcov[, wcov]) specifies the variance-covariance structure of
the random-effects; default bcov is unstructured (and wcov is independent; in network meta-analysis)

cveffect(se|sp|sesp) specify which latent outcome is to be affected by
covariate information; default is sesp

interaction(se|sp|sesp) specify for latent outcome to include the interaction terms; default is sesp

cbnetwork notifies the program that the data is in the form tp1 fp1 fn1 tn1 tp2 fp2 fn2 tn2 index comparator to perform a contrast-based network meta-analysis

comparative notifies the program that the studies are comparative (2 observations per study)

abnetwork instructs the program to perform arm-based network meta-analysis (expects atleast 2 observations per study)

by(varname:byvar) specificies the stratifying variable for which the margins are estimated

progress show the progress of the model estimation process

Alphasort sort the categorical variables alphabetically

ref([label], [top|bottom]) specifies the reference level in network and comparative analysis and its position in computing the probability ratios

nomc do not perform model comparison with likelihood-ratio tests comparison the specified model with other simpler models

General

stratify requests for a consolidated sub-analyses by the by(varname:byvar) variable

label(varname:[namevar=varname], [yearvar=varname]) specifies that date be labelled by its name and/or year

nooverall suppress the display of overall estimates in the itable and fplot

nosubgroup suppress the display of the group estimates in the itable and fplot

summaryonly suppress the individual studies in the itable and fplot

download(path) specify the location where a copy of data used to plot the forest plot should be stored

dp(#) set decimal points to display; default is 3

level(level) set confidence level; default is level(95)

power(#) set the exponentiating power; default is 0

sortby(varlist) sort the appearance of studies in the itable and fplot based on the variables in varlist

cimethod(metapreg##citype:citype) specifies how the confidence intervals
for the individuals study proportions are computed; default is citype(exact) for proportions.
For relative ratios, the score/Koopman CI are computed

Tables

noitable suppress display of the table containing the studies

sumtable(logodds|abs|rr|all) which summary tables to present from the model estimates. Default is none of the tables.

foptions

nofplot suppress the forest plot(s)

xlabel(list) defines x-axis labels. No checks are made as to whether these points are sensible.
The points in the list must be comma separated.

xtick(list) adds the listed tick marks to the x-axis. The points in the list must be comma separated.

plotstat(label) specifies comma seperated labels(name) for proportions/relative ratios in the forest plot

outplot(abs|rr) specifies to plot absolute or relative measures when studies are comparative; default is outplot(abs)

texts(#) increases or decreases the text size of the label. Default value is 1

lcols(varlist) specifies additional columns to the left of the plot

double allows more white space in the fplot by running the text on the left i.e lcols(varlist) over two lines in the fplot

diamopt(scatter##connect_options:connect_options) controls the diamonds

pointopt(scatter##marker_options:marker_options) controls the points for the study estimates

arrowopt(twoway_pcarrow:marker_options) controls the arrows for the truncated confidence intervals of the study estimates

olineopt(scatter##connect_options:connect_options) controls the overall and subgroup estimates line

astext(percent) percentage of the forest plot to be taken up by the text. Default is 50

ciopt(scatter##connect_options:connect_options) controls the appearance of confidence intervals for studies

subline displays the line with group estimates

noovline suppress the overall line; by default the overall line is displayed

nostat suppress the text with estimates and confidence intervals; by default the text is displayed

grid place grid lines between the studies; by default the grid lines are suppressed

logscale requests the plot to be in the (natural)log scale

graphsave(filename) save the plot in/as filename

twoway_options specifies other overall graph options

xline(metadta##linearg:linearg) adds a vertical line at a specified x value

soptions

nosroc suppress the sroc plot

nocurve suppress the sroc curve in the sroc plot

colorpalette(string) specify the colour for each class of the grouping categorical variable.

noprediction suppress the prediction region

bubbles show the study size as weight

bubbleid identify the bubbles by row index

spointopt(scatter##marker_options:marker_options) controls the appearance of study points

opointopt(scatter##marker_options:marker_options) controls the appearance of overall summary point(s)

curveopt(scatter##connect_options:connect_options) controls the appearance of curve(s)

ciopt(line_options:line_options) controls the appearance of confidence line(s)

predciopt(line_options:line_options) controls the appearance of prediction line

bubopt(scatter##marker_options:marker_options) controls the appearance of bubbles

bidopt(scatter##marker_label_options:label_options) controls the appearance of labels for the bubbles

graphsave(filename) save the plot in/as filename

twoway_options specifies other overall graph options e.g legend

Model options

random-effects model

Integration
intpoints(# [# ...]) set the number of
integration (quadrature) points; default is intpoints(7)

laplace use Laplacian approximation; equivalent to
intpoints(1)

Maximization
maximize_options control
the maximization process; seldom used

retolerance(#) tolerance for random-effects estimates; default
is retolerance(1e-8); seldom used

reiterate(#) maximum number of iterations for random-effects
estimation; default is reiterate(50); seldom used

matsqrt parameterize variance components using matrix square
roots; the default

matlog parameterize variance components using matrix logarithms

refineopts(meqrlogit##maximize_options:maximize_options) control
the maximization process during refinement of starting values

fixed-effects model

maximize_options control the maximization process; seldom used

fisher(#) Fisher scoring steps

search search for good starting values

bcov

independent different variance parameters for logit sensitivity and logit specificity random-effects, covariance is 0; the default

exchangeable equal variances for logit sensitivity and logit specificity random-effects,
and a different covariance parameter

identity equal variances for logit sensitivity and logit specificity random-effects,
covariance is 0

unstructured all variances logit sensitivity and logit specificity random-effects and covariances to be distinctly
estimated

wcov

independent different variance parameters for logit sensitivity and logit specificity random-effects in the nested factor, the default

identity equal variances for logit sensitivity and logit specificity random-effects in the nested factor

zero zero variance for logit sensitivity and logit specificity in the nested factor i.e assume homogeneity

citype

exact calculate exact confidence intervals; the default

wald calculate Wald confidence intervals

wilson calculate Wilson confidence intervals

agresti calculate Agresti-Coull confidence intervals

jeffreys calculate Jeffreys confidence intervals

Remarks

meqrlogit is used for the random-effects model and binreg for the fixed-effects model.
The binomial distribution is used to model the within-study variability (Hamza et al. 2008).
Studies with less variability have more influence in the pooled estimate since they contribute more to the likelihhod function. The
weighting is implicit and parameter estimation is an iterative procedure. Therefore, even though the forest plot never displays
weights for the individual studies, weighting is indeed done.

Options

Model

model(modeltype [, modelopts]) specifies the type of model to fit. modeltype can be either fixed or random.
modelopts are options controlling the maximisation (both for the fixed- and random-effects model),
and integration (only for the random-effects model) process.

model(fixed [, modelopts]) fits a fixed-effects logistic regression model using binreg.
modelopts:
fisher(#),
search,
technique(maximize##algorithm_spec:algorithm_spec),
difficult,
iterate(#),
tolerance(#),
ltolerance(#),
nrtolerance(#),
nonrtolerance, and
from(init_specs); see [R] maximize. These options are seldom used.

Setting technique() set to something other than BHHH, changes the vcetype to vce(oim).
Specifying technique(bhhh) changes vcetype to vce(opg).

fisher(#) specifies the number of Newton-Raphson steps that should use
the Fisher scoring Hessian or expected information matrix (EIM) before
switching to the observed information matrix (OIM). This option is useful only for Newton-Raphson
optimization.

search specifies that the command search for good starting values. This
option is useful only for Newton-Raphson optimization.

model(random [, integrate_options maximize_options]) fits a mixed-effects logistic regression model using meqrlogit.
The model accounts for the between study heterogeneity and the intrisinc correlation between sensitivity and specificity.

integrate_options: laplace, intpoints(#)

intpoints(#) sets the number of integration points for adaptive
Gaussian quadrature. The more integration points, the more accurate the
approximation to the log likelihood. However, computation time increases with
the number of quadrature points. intpoints(7) is the default.

laplace specifies that log likelihoods be calculated using
the Laplacian approximation, equivalent to adaptive Gaussian quadrature with
one integration point; laplace is equivalent to intpoints(1). The computational time
saved by using laplace is a function of the number of quadrature points raised to a power 2 (the
dimension of the random-effects specification).

The Laplacian approximation has been known to produce biased parameter
estimates, and the bias tends to be more prominent in the estimates of the
variance components rather than in the estimates of the fixed effects.

maximize_options:
difficult,
technique(maximize##algorithm_spec:algorithm_spec),
iterate(#),
tolerance(#),
ltolerance(#),
nrtolerance(#),
nonrtolerance, and
from(init_specs);
see [R] maximize. These options are seldom used.

Examples, model(random, intpoint(9)) to increase the integration points,
model(random, technique(bfgs)) to specify Stata's BFGS maximiztion algorithm.

cov([bcov][, wvoc]) specifies the structure of the covariance matrix for the random-effects.
bcov controls the stucture of the random effects on the first level of hierarchy and is one of the following:
independent, exchangeable, identity, or unstructured.

covariance(independent) covariance structure allows a distinct
variance for each of the two random-effects and assumes the covariance is 0.
The independent covariance matrix has 2 unique parameters.

covariance(exchangeable) structure specifies one common variance for two
random effects and 'non-zero' covariance. The exchangeable covariance matrix has 2 unique parameters.

covariance(identity) is all variances are equal and the covariance is 0.
The identity covariance matrix has 1 parameter.

covariance(unstructured) allows for all variances and covariances to be
distinct. The unstructured covariance matrix has 3 unique parameters. The default is covariance(unstructured).

wvoc controls the stucture of the random effects on the second level of hierarchy and is one of the following: independent, identity, or zero.

cveffect(effect) specify which latent outcome is to be affected by
covariate information. effect can be one of the following: sesp, se, sp.
The default is sesp

cveffect(sesp) specifies that the covariate be included in the equations for the logit sensitivity and logit specificity.
cveffect(sesp) is the default.

cveffect(se) specifies that the covariate be included only in the equations for the logit sensitivity.

cveffect(sp) specifies that the covariate be included only in the equations for the logit specificity.

interaction(effect) specifies on which latent outcome the interactions between the main variable of interest and
other confounding variables should be included. effect can be one of the following: sesp, se, sp.
The default is sesp. This requires at-least two independent variables.

interaction(sesp) specifies that interactions be included in the equations for the logit sensitivity and logit specificity.
interaction(sesp) is the default.

interaction(se) specifies that interactions be included in the equation for the logit sensitivity.

interaction(sp) specifies that interactions be included in the equationfor the logit specificity.

comparative indicate that for each study there are two observations per study.
The variable identifying the pairs should be a string variable and should be the fifth variable after
tp tn fp fn.

cbnetwork instructs the program to fit a model for contrast-based network meta-analysis. The expected data is the format tp1 fp1 fn1 tn1 tp2 fp2 fn2 tn2 index comparator [covariates].
There can be more than one row of observation for each study with data from each seperate comparison.

abnetwork instructs the program to fit a model for contrast-based network meta-analysis.
The variable identifying the different tests should be a string variable and should be the fifth variable after
tp tn fp fn.

progress specifies whether the noisily or quitely display the model maximization process as is being executed.
By defualt the maximization process is executed quitely. This options is useful is stata is taking too long and you want
to see if its actually busy with the maximisation process. On the down-side, there is alot of unnecessary ouput.

nomc indicates not perform model comparison with likelihood-ratio tests comparison the specified model with other simpler models.
By default, simpler models are also fitted to the data and model comparison done using a likelihood ratio tests. For a model with interactions,
the simpler models have one less interaction term in each of the two equations. For a model without interactions, the simpler model leaves one
covariate effect in each of the two equations. A null model, i.e without covariates, is also compared with the specified model.
By default, model comparison is perfomed. By imposing nomc, substantial time can be saved
especially for complex models involving many covariates and interactions.

alphasort sort the categorical variables alphabetically. By default, are encoded such that the value labels are sorted according to the
rank order as they appear in the data. The option alphasort sorts the categorical variables in the model alphabetical so that the class that appears
first alphabetically is assigned the base level.

by(byvar) specifies that the summary etsimates be stratified/grouped according to the variable declared. This is useful in meta-regression with more than one covariate,
and the byvar is not one of the covariates or when there are interactions and the first covariate is not an ideal grouping variable. By default, results are grouped according to the
levels of the first categorical variable in the regression equation.

This option is not the same as the Stata by prefix which repeates the analysis for each group of observation for which the values of the prefixed variable are the same.

Tables

sumtable(none|logodds|abs|rr|all)} specifies which summary margins tables to present from the logistic regression model estimates.
parameter can be one of the following:
logodds, abs, rr, all or a list eg logodds abs rr. By default none of the tables is displayed.
The estimates are obtained using margins which calculates predictions from a fitted model at fixed values of some covariates
and averaging or otherwise integrating over the remaining covariates. The tables present the parameter estimates, their standard-errors,
the z-statistic, and a confidence interval.

sumtable(logodds)} requests the marginal log-odds for each class of the categorical variable, and the log-odds
at the mean of continous varibles. When there are interaction, the log-odds are computed for the each combination of the
variable of interest and the confounding factor.

sumtable(abs)} requests the marginal proportions i.e estimates for each class of the categorical variable, and the log-odds
at the mean of continous varibles. When there are interaction, the proportions are computed for the each combination of the
variable of interest and the confounding factor. The standard-errors, Z-statistic and p-value are in the log-odds scale.

sumtable(rr)} requests the marginal relative ratio estimates. When studies are not comparative, the ratio are computed using the first class in
the categorical variable as the base. With data from comparative studies, the ratio comparing the two classes in the variable of interest is presented for each class of the
confounding variables. The standard-errors, Z-statistic and p-value are in the log scale. sumtable(rr) requires at-least one covariate.

noitable suppress display of the table containing the studies and the summary estimates. By default, the table presented.

General

ref([label][,position]) specifies the reference category and its position when computing the summary probability ratios in comparative
and network meta-analysis. The first category in the fifth variable is used as the reference by default.

stratify requests for a consolidated sub-analyses by the by(varname:byvar) variable. The results are
presented in one table and one forest plot

label(varname[namevar=varname], [yearvar=varname]) specifies that date be labelled by its name and/or year.
Either or both option/s may be left blank.

nooverall suppress the display of overall estimates in the itable and fplot. By default, the overall summary estimate is presented.

nosubgroup suppress the display of the group estimates for each level of the grouping variable in the itable and fplot.
By default, the group estimates are displayed. The group absolute estimates are displayed with one categorical variable.
With data from comparative studies, two categorical variables where one is the variable of interest and the other a confounding variable, it is possible to
present the group relative ratios with the options comparative and outplot(rr). The group estimates are not presented when there are more
than one (for outplot(abs)) or two(for outplot(rr)) independent variables.

summaryonly suppress the individual studies in the itable and fplot. This options is usefull when you want to present the group and overall estimates only,
or when the number of studies in each of the groups are too many to avoid over-crowding the itable and/or forest plot.

download(filepath) specify the location where a copy of data used to plot the forest plot should be stored. The is useful if you need to fit other models to the
exact data used by metadta, or when you want to generate other plots with the generated data.
The saved dataset is in the long format and contains the following variables:

_ES Estimate proportion/relative ratio

_LCI The lower confidence limit for _ES

_UCI The upper confidence limit for _ES

_ESAMPLE Indicator variable if the study was included (1) or excluded(0) in the model.

_USE Indicator variable for the role of an observation in the dataset: -2 = labels, 0 = blanks, 1 = studies, 2 = group data, & 3 = overall data.

_LABEL Labels for each observations

_ID A numeric observations ID equivalence of _LABEL

_PARAMETER Indicator variable to identify data on the sensitivity(1) and specificity(0)

dp(#) sets the decimal points to display in the summary tables, the itable and the forestplot; default is 3. # is an any sensible positive integer.

level(level) sets the confidence level. The default is level(95). The set level is used in all computations for the confidence intervals,
regions, prediction regions, and other computations that require a specification of the significance level. Other typical values are level(90) and level(99).

power(#) sets the exponentiating power with base 10; default is 0. Any integer is allowed.
When specified, the estimates in the summary tables, itable and the forest plot are multiplied by 10 raised to power #.
The x-axis labels of the forest plot should be adjusted accordingly when power(#) is adjusted. This option is useful to present percentages instead of proportions or
when the estimates are very small and still want to display a reasonable number of decimal places.

sortby(varlist) sort the appearance of studies in the itable and fplot based on the variables in varlist. By default, the studies in the itable
and the forest plot are displayed as they appear in the data editor. If there group summaries are requested, data is sorted by group but within the group, the order
is maintained. The groups are sorted by their rank index in the data, i.e, the groups are sorted according to their appearance in the data.

cimethod(citype) specifies how the binomial confidence intervals
for the individuals study proportions are computed. citype can be any of the following:
exact, wald, wilson, agresti, and jeffreys.

cimethod(exact) is the default and specifies exact (also known in the literature
as Clopper-Pearson [1934]) binomial confidence intervals.

cimethod(wald) specifies calculation of Wald confidence intervals.

cimethod(wilson) specifies calculation of Wilson confidence intervals.

cimethod(agresti) specifies calculation of Agresti-Coull confidence intervals.

cimethod(jeffreys) specifies calculation of Jeffreys confidence intervals.

See Brown, Cai, and DasGupta (2001) for a discussion and
comparison of the different binomial confidence intervals.

For relative ratios, the score/Koopman[1984] CI are computed

foptions

nofplot suppress the forest plot(s). By default, a forest plot is presented.

logscale requests the plot to be in the (natural)log scale

xlabel(list) defines x-axis labels. No checks are made as to whether these points are sensible. The points in the list must be comma separated.

xtick(list) adds the listed tick marks to the x-axis. The points in the list must be comma separated.

plotstat(label) specifies comma-seperated labels(name) for proportions/relative ratios in the forest plot. E.g plotstat(Sensitivity, Specificity)

outplot(abs|rr) specifies to plot absolute or relative measures when data is comparative; default is outplot(abs).

outplot(abs) specifies to plot the absolute measures, i.e the sensitivity and specificity.

outplot(rr) specifies to plot the relative measures.

texts(#)increases or decreases the text size of the label. Default value is 1

lcols(varlist)specifies additional columns to the left of the plot. texts(#) can be used to fine-tune the size of the text in order to
achieve a satisfactory appearance. The columns are labelled with the variable label, or the variable name if
this is not defined. The first variable specified in lcols() is assumed to be the study identifier and this is used in the itable output.

double allows more white space in the fplot by running the text on the left i.e lcols(varlist) over two lines in the fplot. This might be useful to make
the forest plot look less crowded.

diamopt(options) controls the appearance of the diamonds.
See connect_options for the relevant options. e.g diamopt(lcolor(red))
displays red (a) red diamond(s).

pointopt(options) controls the points for the study estimates.
See marker_options for the relevant options. e.g pointopt(msymbol(x) msize(0))

arrowopt(options) controls the arrows for the truncated confidence intervals of the study estimates.
See marker_options for the relevant options. e.g arrowopt(barbsize(small) msize(1))

ciopt(options) ontrols the appearance of confidence intervals for studies.
See connect_options for the relevant options.

olineopt(options) controls the overall and subgroup estimates line.
See connect_options for the relevant options.

astext(percent) percentage of the forest plot to be taken up by the text. Default is 50. The percentage must be in the range 10-90.

subline displays the line with group estimates. By default, the only the diamonds for the groups is displayed but not the lines.

noovline suppress the overall line; by default the overall line is displayed.

nostat suppress the text with estimates and confidence intervals; by default the text is displayed

grid show horizontal grid lines on the forestplot; by default no grids are displayed. With many studies, adding grid lines help with readabilitity

graphsave(filename) specifies the location where the .gph graph will be saved. The graph is saved asis. If more than 1 graphs are generated, 'flpot_#' is appended to the name.

twoway_options specifies other overall graph to control how the look of the plot. This allows the addition of titles, subtitles, captions,
etc., control of margins, plot regions, graph size, aspect ratio, and the use of schemes. eg
graphregion(color(white))

xline(linearg) adds a vertical line where linearg is x [,options]. The options to specify the look of the line include
lstyle(linestyle),
lpattern(linepatternstyle),
lwidth(linewidthstyle),
and lcolor(colorstyle)
; see [G-2] graph twoway line.

soptions

nosroc suppress the sroc/cross plot. By default an sroc/cross plot is presented. For the model with no covariates, more than one
covariates, or only continous variables, the sroc plots presents a center, an sroc curve, and the corresponding confidence and prediction regions for the
overall sensitivity and specificity. A scatter of the studies in the meta-analysis is also plotted.
When there is one categorical variable, the center, sroc curve, confidence and prediction region, and the studies in each level
are plotted each in a distinct colour. When a fixed-effects model is fitted, the sroc curve, and the confidence and prediction intervals are not presented.
Instead, a cross is plotted spanning the confidence intervals of sensitivity and specificity.

colorpalette(string) specify the colour for each class of the grouping categorical variable. The default color palette has the following
colours: black forest_green cranberry blue sienna orange emerald magenta dknavy gray purple. Each class of the grouping
variable is assigned a colour from the palette.

nocurve suppress the sroc curve. By default, the curvn is displayed whenever the
a random-effects model is fitted.

noprediction suppress the prediction region. By default, the prediction region is displayed whenever the
a random-effects model is fitted.

bubbles show the study size as weight. By default, only a scatter points are displayed to indicate the studies. This option
might be useful if interested in seeing the the study sizes since the bubble are proportional to the studies sizes.

bubbleid identify the bubbles by row index. When the bubbles are plotted, one might be interested in identifying some studies. Each
bubble is identified by a number which is the row number of the submitted data.

spointopt(marker_options) See marker_options controls the appearance of study points

opointopt(marker_options) See marker_options controls the appearance of overall summary point(s)

curveopt(connect_options) See connect_options controls the appearance of curve(s)

ciopt(line_options) See line_options controls the appearance of confidence line(s)

predciopt(line_options) See line_options controls the appearance of prediction line

bubopt(marker_options) See marker_options controls the appearance of bubbles

bidopt(label_options) See label_options controls the appearance of labels for the bubbles

graphsave(filename) specifies the location where the .gph graph will be saved. The graph is saved asis. If more than 1 graphs are generated, 'flpot_#' is appended to the name.

twoway_options specifies the graph options for the SROC plot giving control of axis, scales, legend, titles, subtitles, captions,
margins, plot regions, graph size, aspect ratio, etc. e.g
graphregion(color(white)). To change the order of the legend, the elements in the SROC plot are drawn in the following order; summary points, confidence cross,
sroc curve, confidence region, prediction region, observed data, the study bubbles and finaly the identifiers for the bubbles.

Examples

1. Intercept-only random-effects model

The intercept-only model is the classical model for meta-anlysis to pool data. The data is obtained from
a systematical review of sensitivity and specificity of cytology and other markers including telomerase for
primary diagnosis of bladder cancer Glas et al (2003).

The look of the sroc and forest plot is enhanced via soptions(...) and foptions(...).

//fmwww.bc.edu/repec/bocode/t/telomerase.dta""':. use "http://fmwww.bc.edu/repec/bocode/t/telomerase.dta"

. metadta tp fp fn tn, ///

studyid(study) model(random) dp(2) sumtable(all) ///

soptions(xtitle("False positive rate") xlabel(0(0.2)1) xscale(range(0 1)) ///

ytitle("Sensitivity") yscale(range(0 1)) ylabel(0(0.2)1, nogrid) ///

graphregion(color(white)) plotregion(margin(medium)) xsize(15) ysize(15)) ///

foptions(graphregion(color(white)) texts(3) xlabel(0, 0.5, 1) ///

diamopt(color(red)) pointopt(msymbol(s)msize(1)) olineopt(color(red) lpattern(dash)))

(click to run)

2.1 Metaregression - Comparative studies - 1 Covariate

This example demonstrates how the intercept only model is extended in a meta-regression setting.
The data is from a Cochrane review on the accuracy of human papillomavirus testing and repeat cytology to
triage of women with an equivocal Pap smear to diagnose cervical precancer performed by Arbyn et al(2013).

The option comparative indicates that the data is in pairs and automatically the first covariate serves as the pair identifying variable.
With one categorical variable, different sroc curves each for every category is also displayed. The look of the sroc and forest plot is enhanced
via soptions(...) and foptions(...).

//fmwww.bc.edu/repec/bocode/a/ascus.dta""':. use "http://fmwww.bc.edu/repec/bocode/a/ascus.dta"

. metadta tp fp fn tn test, ///

studyid(studyid) model(random) comparative sumtable(all) ///

soptions(xtitle("False positive rate") xlabel(0(0.2)1) xscale(range(0 1)) ///

ytitle("Sensitivity") yscale(range(0 1)) ylabel(0(0.2)1, nogrid) ///

legend(order(1 "Repeat Cytology" 2 "HC2") ring(0) bplacement(6)) ///

graphregion(color(white)) plotregion(margin(zero)) col(red blue)) ///

foptions(graphregion(color(white)) outplot(abs) texts(2) xlabel(0, 1, 1) ///

diamopt(color(red)) pointopt(msymbol(s)msize(1)) olineopt(color(red) lpattern(dash)))

(click to run)

2.2 Metaregression - Comparative studies - 1 Covariate - RR

This example extends Example 2.1 by presenting the relative summary measures instead of the absolute measures.

//fmwww.bc.edu/repec/bocode/a/ascus.dta""':. use "http://fmwww.bc.edu/repec/bocode/a/ascus.dta"

. metadta tp fp fn tn test, ///

studyid(studyid) model(random) comparative sumtable(all) ///

foptions(graphregion(color(white)) outplot(rr) texts(2) xlabel(0, 1, 1) ///

diamopt(color(red)) pointopt(msymbol(s)msize(1)) olineopt(color(red) lpattern(dash)))

(click to run)

3. Metaregression - Comparative studies - 2 Covariates

This example demonstrates how to examine (dis-)similarity of relative sensitivity and specificity across the different clinical setup.
Using sample of data from a meta-analysis on accuracy of human papillomavirus testing on self-collected versus
clinician-samples Arbyn et al(2014), we test whether the relative sensitivity and relative specificity between self and
clinician sample are similar across the clinical settings.

From simple analysis via tables, it was suspected that the sensitivity and specificity was different by the clinical setting and sample collection.
We therefore include an interaction between sample and Setting with the option interaction(sesp). sesp implies that the interaction
terms are introduced in both the logit sensitivity and logit specificity equations. Model comparison with simpler models that do exclude the
interaction terms happens automatically.

With the option sumtable(rr) only the summary relative ratios are presented. The option noitable also suppresses
the table with individual studies.

The look of the sroc and forest plot is enhanced via soptions(...) and foptions(...). With more than one covariate or when the focus is on RR,
the sroc plot is not presented.

//fmwww.bc.edu/repec/bocode/c/clinself.dta""':. use "http://fmwww.bc.edu/repec/bocode/c/clinself.dta"

. metadta tp fp fn tn sample Setting, ///

studyid(study) interaction(sesp) model(random) ///

summaryonly comparative sumtable(rr) noitable ///

soptions(xtitle("False positive rate") xlabel(0(0.2)1) xscale(range(0 1)) ///

ytitle("Sensitivity") yscale(range(0 1)) ylabel(0(0.2)1, nogrid) ///

graphregion(color(white)) plotregion(margin(zero))) ///

foptions(diamopt(color(red)) olineopt(color(red) lpattern(dash)) ///

outplot(RR) graphregion(color(white)) texts(2) xlabel(0.7, 1, 1.2))

(click to run)

4. Metaregression - Comparative - 3 Covariates

We extend Example 3 above and examine differences in relative sensitivity and specificity by test assay while
accounting for the clinical setup. The look of the sroc and forest plot is enhanced via soptions(...) and foptions(...).

//fmwww.bc.edu/repec/bocode/c/clinself.dta""':. use "http://fmwww.bc.edu/repec/bocode/c/clinself.dta"

. metadta tp fp fn tn sample Setting TA, ///

studyid(study) interaction(sesp) model(random) cov(unstructured) ///

comparative noitable sumtable(rr) ///

soptions(xtitle("False positive rate") xlabel(0(0.2)1) xscale(range(0 1)) ///

ytitle("Sensitivity") yscale(range(0 1)) ylabel(0(0.2)1, nogrid) ///

graphregion(color(white)) plotregion(margin(zero))) ///

foptions(outplot(rr) grid graphregion(color(white)) texts(1.5) xlabel(0.7, 1, 1.3) ///

arrowopt(msize(1)) diamopt(color(red)) olineopt(color(red) lpattern(dash)))

(click to run)

5. Metaregression - contrast-based network meta-analysis - RR

Each row in the dataset is of the form tp1 fp1 fn1 tn1 tp2 fp2 fn2 tn2 index comparator. The data should be a from a 2x2 table as displayed below;

| Disease Status

index | Positive Negative |

- - - - - - - - - - - - - - - - - -

Positive | tp1 fp1 |

Negative | fn1 tn1 |

- - - - - - - - - - - - - - - - - -

| Disease Status

comparator| Positive Negative |

- - - - - - - - - - - - - - - - - -

Positive | tp2 fp2 |

Negative | fn2 tn2 |

- - - - - - - - - - - - - - - - - -

//fmwww.bc.edu/repec/bocode/p/pairedta.dta""':. use "http://fmwww.bc.edu/repec/bocode/p/pairedta.dta"

. metadta tp1 fp1 fn1 tn1 tp2 fp2 fn2 tn2 hpv1 hpv2, ///

studyid(study) model(random) cov(, zero) ///

cbnetwork sumtable(rr) ///

foptions(outplot(rr) grid graphregion(color(white)) texts(1.85) ///

xlabel(0.75, 0.90, 1, 1.11, 1.33) logscale lcols(hpv2 setting) astext(70) ///

arrowopt(msize(1)) pointopt(msymbol(s)msize(1)) diamopt(color(red)) olineopt(color(red) lpattern(dash)))

(click to run)

6. Metaregression - arm-based network meta-analysis - RR

//fmwww.bc.edu/repec/bocode/n/network.dta""':. use "http://fmwww.bc.edu/repec/bocode/n/network.dta"

. metadta tp fp fn tn test , ///

studyid(study) model(random, laplace) ///

abnetwork ref(HC2) sumtable(all) ///

foptions(outplot(rr) graphregion(color(white)) texts(1.75) ///

xlabel(0.80, 0.90, 1, 1.11, 2) logscale astext(70) ///

arrowopt(msize(1)) pointopt(msymbol(s)msize(.5)) ///

diamopt(color(red)) olineopt(color(red) lpattern(dash)))

(click to run)

Stored results

metadta stores the following in e():

Scalars

e(cmd) metadta

e(cmdline) command as typed

e(i_sq) estimated I squared

e(p_chi2) p-value for LR test comparing the fixed and random effects models

e(chi2) chisq. for LR test comparing the fixed and random effects models

e(df) degrees of freedom

e(sp_df_het) degrees of freedom for the LR test on significance of the covariates on specificity

e(sp_p_het) p-value for the LR test on significance of the covariates on specificity

e(sp_het) chi square statistic for the LR test on significance of the covariates on specificity

e(se_df_het) degrees of freedom for the LR test on significance of the covariates on sensitivity

e(se_p_het) p-value for the LR test on sigficance of the covariates on sensitivity

e(se_het) chi square statistic for the LR test on significance of the covariates on sensitivity

e(sp_p_z) p-value for testing if specificity = 0.5 or rel. specificity = 1

e(sp_z) z-statistic for testing if specificity = 0.5 or rel. specificity = 1

e(sp_ci_upp) upper confidence limit of the overall specificity estimate

e(sp_ci_low) lower confidence limit of the overall specificity estimate

e(sp_seES) standard error of the overall specificity estimate

e(sp_ES) overall specificity estimate (either a proportion or ratio)

e(se_p_z) p-value for testing if sensitivity = 0.5 or rel. sensitivity = 1

e(se_z) z-statistic for testing if sensitivity = 0.5 or rel. sensitivity = 1

e(se_ci_upp) upper confidence limit of the overall sensitivity estimate

e(se_ci_low) lower confidence limit of the overall sensitivity estimate

e(se_seES) standard error of the overall sensitivity estimate

e(se_ES) overall sensitivity estimate (either a proportion or ratio)

Matrices

e(sprrout) summary relative specificity ratios

e(serrout) summary relative sensitivity ratios

e(rrout) summary relative ratios

e(absoutsp) summary specificity proportions

e(absoutse) summary sensitivity proportions

e(absout) summary proportions

e(logodds) summary log-odds

e(vcovar) variance-covariance matrix of logit sensitivity and specificity.

Technical notes

by

When prefix by is used, only the results from the last group or the first model will be stored respectively.

Post-estimation

metadta also stores (in memory) the estimation results from the specified model in metadta_modest. These results can be
saved, restored and stored and used in making comparisons. See estimates.

Author

Victoria N. Nyaga (Victoria.NyawiraNyaga@sciensano.be)

Unit Cance Epidemiology - Belgian Cancer Center,

Sciensano,

Juliette Wytsmanstraat 14,

1050 Brussels,

Belgium.

Marc Arbyn (Marc.Arbyn@sciensano.be)

Belgian Cancer Center/Unit of Cancer Epidemiology,

Sciensano,

Juliette Wytsmanstraat 14,

B1050 Brussels,

Belgium.

References

Hamza et al. 2008. The binomial distribution of meta-analysis was preferred to model within-study variability.
Journal of Clinical Epidemiology 61: 41-51.

Brown, L. D., T. T. Cai, and A. DasGupta. 2001.
Interval estimation for a binomial proportion.
Statistical Science 16: 101-133.

Clopper, C. J., and E. S. Pearson. 1934. The
use of confidence or fiducial limits illustrated in the case of the binomial.
Biometrika 26: 404-413.

Koopman, P. A. R. 1984. Confidence intervals for the ratio of two binomial proportions.
Biometrics 40(2): 513-517.

Arbyn M., Roelens J., Simoens C., Buntinx F., Paraskevaidis E., Martin-Hirsch PPL., Prendiville W. 2013.
Human Papillomavirus Testing Versus Repeat Cytology for Triage of Minor Cytological Cervical Lesions.
Cochrane Database of Systematic Reviews: 31-201.

Arbyn, M., Verdoodt, F., Snijders, P.J., Verhoef, V.M., Suonio, E., Dillner, L., Minozzi, S., Bellisario, C., Banzi, R., Zhao, F.H. and Hillemanns, P., 2014.
Accuracy of human papillomavirus testing on self-collected versus clinician-collected samples: a meta-analysis.
The lancet oncology 15(2): 172-183.