R: Do pairwise statistical test on the summary measure (VUS or...
Pairwise.DiagTest3Grp.Test
R Documentation
Do pairwise statistical test on the summary measure (VUS or Youden)
estimate between a pair among multiple markers
Description
Do pairwise statistical test to compare the summary measure (VUS or Youden)
estimates between a pair of markers among multiple markers assuming
that the marker follows normal distribution in each diagnosis group, for both
independent samples and paired samples.Resulting p-values can be
adjusted for mulltiple testing. The function returns a nice
upper-triagnular graphical display and print
matrix on pairwise comparisons.
For unpaired data (data measured on different independent
sets of samples), dat is a list of K (=number of markers)
components, each corresponding to a marker. Each component of the
list should be a data frame of number of observation by two columns:(1) group
(note:must be at the 1st column) with the three levels of D^-,
D^0 and D^+ (corresponding to increasing disease
severity respectively); (2)numeric marker measurements at the 2nd
column.
for paired data, dat should be a data frame with
observations at row and group/markers at column (group must be at the
1st column) with the three levels D^-,
D^0 and D^+(corresponding to increasing disease
severity respectively), followed by markers at the 2nd to the
last column.
paired
A logic value TRUE/FALSE, indicating whether all markers are measured on the same set (paired=TRUE) or not (paired=FALSE).
type
A character value. type=“VUS” or “Youden”,
indicates which summary measure (VUS or Youden) will be used to
indicate the discriminative ability of the three-group diagnostic
tests. Allows unique argument matching,i.e., can use unique
abbreviations such as “V” or “Y”.
p
A numeric value. To test on partial VUS satisfying specificity >=p and
sensitivity >=q, set p, q to desired value. default=0 for full VUS.
q
A numeric value.To test on partial VUS satisfying specificity
>=p and sensitivity >=q, set p, q to desired value. default=0 for
full VUS.
mu
A numeric value. The hypothesized true difference between
two markers. Default mu=0 but can be changed to a nonzero value.
conf.level
a numerica value. The confidence
interval. default=95%. The confidence interval on point estimate of
abs diff between two markers's summary measures will be
returned. For >=3 markers, this will be NA.
alternative
A character value. Now is fixed as "two-sided".
p.adjust.method
A vector string specifying multiple testing
adjustment method.Default=“none”.
digits
A numeric integer. The number of digits for p-value
print
...
Other arguments that can be input into heatmap.2() function
in R package gplots.
Details
see p.adjust for details on multiple testing adjustment on p-values.
and see DiagTest3Grp.Test for statistical test between
two markers.
Value
Besides a heatmap illustrating the mulitple testing adjustment
corrected P-values from pairwise comparisons in a upper-triangular
display, the function also returns a list of two components:
print.matrix
A data frame. If K markers are analyzed, the data
frame will have K-1 row and K-1 columns. The first column contains the IDs
of markers 1:(K-1) while the column names are ID for marker 2:K.The
entries in column 3 and following are stat (t statistic), raw P
(raw P value) or adjusted P from testing two markers. The 2nd column indicates whether the
matching row indicate stat (z-statistic), raw P
(raw P value) or adjusted P. So this output basically presen the
results in an upper triangular matrix format.
pval.matrix
More detailed output. A data frame with the
columns: index of marker 1, index of marker 2, ID of marker1,summary
measure estimated for marker 1, ID of
marker2,summary
measure estimated for marker 1, the lower limit of the resulting CI
on the difference between the summary measure estimates (marker1-marker2), the upper
limit of the CI, z-statistic, raw P value and adjusted P value.
Warning
The bootstrapping to obtain the variance on the
nonparametric VUS estimate may take a while.
Note
Bug reports, malfunctioning, or suggestions for further improvements or
contributions can be sent to Jingqin Luo <rosy@wubios.wustl.edu>.
Author(s)
Jingqin Luo
References
Xiong, C. and van Belle, G. and Miller, J.P. and Morris, J.C. (2006)
Measuring and Estimating Diagnostic Accuracy When There
Are Three Ordinal Diagnostic Groups. Statistics In Medicine25
7 1251–1273.
Ferri, C. and Hernandez-Orallo, J. and Salido, M.A. (2003) Volume
under the ROC Surface for Multi-class Problems LECTURE NOTES IN
COMPUTER SCIENCE 108–120.
Xiong, C and Van Belle, G. and Miller, J.P. and Yan, Y. and Gao, F.,
and Yu, K, and Morris, J. (2007) A Parametric Comparison of Diagnostic
Accuracy with Three Ordinal Diagnostic Groups. Biometrical
Journal 5, 682-693
Luo, J and Xiong, C. (2012) Youden Index and Associated Optimal Cut-point
for Three Ordinal Groups. Communications In Statistics-Simulation
and Computation(in press).
Jingqin Luo, Chengjie Xiong (2012). DiagTest3Grp: An R Package for
Analyzing Diagnostic Tests with Three Ordinal Groups.Journal of
Statistical Software, 51(3), 1-24.URL
http://www.jstatsoft.org/v51/i03/.
See Also
VUSYouden3Grp
Examples
data(AL)
new.AL <- data.frame(group=AL$group,-AL[,-1])
new.AL <- new.AL[,1:4]##use the first 3 markers as an example
##omnibus test on the 3 AL markers
Pairwise.DiagTest3Grp.Test(dat=new.AL, paired=TRUE, type="VUS",p=0,q=0,
conf.level=0.95,p.adjust.method="fdr",digits=3)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DiagTest3Grp)
Loading required package: car
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
Loading required package: gplots
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DiagTest3Grp/Pairwise.DiagTest3Grp.Test.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Pairwise.DiagTest3Grp.Test
> ### Title: Do pairwise statistical test on the summary measure (VUS or
> ### Youden) estimate between a pair among multiple markers
> ### Aliases: Pairwise.DiagTest3Grp.Test
> ### Keywords: htest
>
> ### ** Examples
>
>
> data(AL)
> new.AL <- data.frame(group=AL$group,-AL[,-1])
> new.AL <- new.AL[,1:4]##use the first 3 markers as an example
>
> ##omnibus test on the 3 AL markers
> Pairwise.DiagTest3Grp.Test(dat=new.AL, paired=TRUE, type="VUS",p=0,q=0,
+ conf.level=0.95,p.adjust.method="fdr",digits=3)
$print.matrix
MarkerID Row ktemp kpar
1 FACTOR1 Z-statistic -0.646 3.352
2 <NA> raw P 0.518 0.000802
3 <NA> adjusted P 0.518 0.00241
4 ktemp Z-statistic <NA> 2.995
5 <NA> raw P <NA> 0.00275
6 <NA> adjusted P <NA> 0.00412
$pval.matrix
i1 i2 marker1 summary.measure1 marker2 summary.measure2 CI.lower
1 1 2 FACTOR1 0.7282689 ktemp 0.7517546 -0.09475827
2 1 3 FACTOR1 0.7282689 kpar 0.5545725 0.07213255
3 2 3 ktemp 0.7517546 kpar 0.5545725 0.06813585
CI.upper statistic p.value adjust.p.value
1 0.04778673 -0.6458488 0.5183773103 0.518377310
2 0.27526023 3.3519672 0.0008023951 0.002407185
3 0.32622846 2.9948159 0.0027461057 0.004119159
>
>
>
>
>
>
> dev.off()
null device
1
>