Given the frequencies of true positives, false negative, false positives and true negatives from primary diagnostic studies madad
calculates various summary statistics. Apart from sensitivities, specificities and false positive rates the function also calculates the diagnostic odds ratio (DOR) and the positve and negative likelihood ratios, together with their respective confidence intervals. Also two hypothesis tests are calculated: one testing the equality of the sensitivities and the same for the false positive rates.
madad(x = NULL, TP, FN, FP, TN, level = 0.95, correction = 0.5,
correction.control = "all", method = "wilson", yates = TRUE,
suppress = TRUE, ...)# S3 method for madad
print(x, digits = 3, ...)
any object that can be converted to a data frame with integer variables TP
, FN
, FP
and TN
, alternatively a matrix with column names including TP
, FN
, FP
and TN
.
vector of integers, ingored if X
is not NULL
.
vector of integers, ingored if X
is not NULL
.
vector of integers, ingored if X
is not NULL
.
vector of integers, ingored if X
is not NULL
.
numeric, continuity correction applied to zero cells.
character, if set to "all"
(the default) the continuity correction is added to the whole data if only one cell in one study is zero. If set to "single"
the correction is only applied to rows of the data which have a zero.
numeric, confidence level for the calculations of confidence intervals.
character, method used to calculate the confidence intervals for sensitivities, specificities and false positive rates. One of "wald"
, "wilson"
, "agresti-coull"
, "jeffreys"
, "modified wilson"
, "modified jeffreys"
, "clopper-pearson"
, "arcsine"
, "logit"
, "witting"
logical, should a Yates correction be used for testing the equality of sensitivities and specificities?
integer, to what decimal place is the output to be rounded?
logical, suppress the warning that is generated by prop.test
when Chi-square approximation may be incorrect.
further arguments to be passed on the other funtions (currently none).
An object of class madad
which is essentially a list with the following components:
A list of two components, sens
(the sensitivities) and sens.ci
the confidence intervals (a matrix with 2 columns).
A list of two components, spec
(the specificities) and spec.ci
the confidence intervals (a matrix with 2 columns).
A list of two components, fpr
(the false positive rates) and fpr.ci
the confidence intervals (a matrix with 2 columns).
An object of class htest
.
An object of class htest
.
A list of two components, DOR
the diagnostic odds ratios and DOR.ci
the confidence intervals (a matrix with 2 columns).
A list of two components, posLR
the positive likelihood ratios and posLR.ci
the confidence intervals (a matrix with 2 columns).
A list of two components, negLR
the negative likelihood ratios and negLR.ci
the confidence intervals (a matrix with 2 columns).
numeric, the correlation of the sensitivities and false-positive rates.
numeric
character
character vector, if the main argument of madad
is a data frame with a variable names
these names are stored here.
integer, number of primary studies.
data frame, with columns TP
, FN
, FP
and TN
.
character, name of the main argument.
numeric
character
All calculations are performed using the continuity corrected cell counts, so if there are zero cells, the sensitivities and specificities not equal to 1. This can be avoided by setting correction.control
to "none"
.
The test for the equality of sensitivities and its counterpart for the specificities is based on prop.test
. This function will occasionally output warnings.
# NOT RUN {
data(AuditC)
AuditC.d <- madad(AuditC)
print(AuditC.d, digits = 2) #round everything to 2 digits
# }
Run the code above in your browser using DataLab