Last data update: 2014.03.03

R: Statistical test on the summary measure (VUS or Youden)...
DiagTest3Grp.TestR Documentation

Statistical test on the summary measure (VUS or Youden) estimate on two markers or multiple markers

Description

Statistical test to compare the summary measure (VUS or Youden) estimates between two markers or multiple markers assuming that the marker follows normal distribution in each diagnosis group, for both independent samples and paired samples.

Usage

DiagTest3Grp.Test (dat,paired=FALSE, type=c("VUS","Youden"),p=0,q=0,mu=0,
     conf.level=0.95, alternative=c("two.sided","less","greater"))

Arguments

dat

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

Details

Let θ_j indicate the summary measure (either VUS or Youden) on a marker j. When testing Q markers (Q≥3) markers, the omnibus test similar to one-way ANOVA is performed with the hypothesis H_0: θ_1=θ_2=cdots=θ_Q against the alternative H_1: at least a pair of markers have unequivalent summary measures. The resulting statistic is a Chi-square statistic with Q-1 degree of freedom. When testing 2 markers, the normal test is performed to test the hypothesis H_0: θ_1-θ_2=θ_0 against H_1:θ_1-θ_2\neq 0 for alternative=dQuote{two.sided}, H_1:θ_1-θ_2<0 for alternative=dQuote{less} and H_1:θ_1-θ_2> 0 for alternative=dQuote{greater} The z-statistic is formed (difference in summary measures divided by the standard error on the difference) for normal test.

Value

An object of the classic S3 class htest (slightly modified) with the list of components.

statistic

A numeric value. In situations of testing >=3 markers, this is a Chi-Square statistic; in testing 2 markers, this is a Z-statistic.

p.value

A numeric value. The p-value testing the hypothesis (see details) from Chi-square test (for >=3 markers) or normal test (2 markers).

parameter

A numeric value. For the Chi-square test on >=3 markers, it's the degree of freedom. In the normal test on 2 markers, it's mean 0 and sd=1.

estimate

A numeric vector. The summary measures estimated on each marker.

conf.int

A numeric vector of length 2. The confidence interval on the difference in the summary measures of two marker(marker1 at the 1st column of dat input-marker2 at the 2nd column at dat input). For testing >=3 markers, NA.

method

A character value. “Chi-square test” for >=3 markers or “Normal-test” for 2 markers.

type

A character value. Either VUS or Youden, which type of summary measure is in use.

null.value

A numeric value. The inputted value for mu which is now fixed as 0 for >=3 marker comparison but can be changed to any numeric value for two marker comparison.

alternative

A character value which is always “two.sided” for >=3 marker comparison but can be “two.sided”, “less” or “greater”.

data.name

Usually prints Test of the name of the inputted data frame on the type of a summary measure.

Sigma

A numeric matrix. The covariance matrix on the summary measures estimated on markers.

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 Medicine 25 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-points 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

VUS Youden3Grp

Examples


 data(AL)
 AL <- data.frame(group=AL$group,-AL[,-1])

 #group <- AL$group
 #table(group)

 ##omnibus test on all 14 marker
 DiagTest3Grp.Test(dat=AL,paired=TRUE,type="VUS",p=0,q=0,conf.level=0.95)
 DiagTest3Grp.Test(dat=AL,paired=TRUE,type="Youden",p=0,q=0,conf.level=0.95)

 ##normal test on 2 of the markers
 new.AL <- subset(AL,select=c(group,ktemp,zbentd))
 DiagTest3Grp.Test(dat=new.AL,paired=TRUE,type="VUS",p=0,q=0,conf.level=0.95)
 DiagTest3Grp.Test(dat=new.AL,paired=TRUE,type="Youden",p=0,q=0,conf.level=0.95)

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/DiagTest3Grp.Test.Rd_%03d_medium.png", width=480, height=480)
> ### Name: DiagTest3Grp.Test
> ### Title: Statistical test on the summary measure (VUS or Youden) estimate
> ###   on two markers or multiple markers
> ### Aliases: DiagTest3Grp.Test
> ### Keywords: htest
> 
> ### ** Examples
> 
> 
>  data(AL)
>  AL <- data.frame(group=AL$group,-AL[,-1])
> 
>  #group <- AL$group
>  #table(group)
> 
>  ##omnibus test on all 14 marker
>  DiagTest3Grp.Test(dat=AL,paired=TRUE,type="VUS",p=0,q=0,conf.level=0.95)

	Chi-Sqaure test

data:  Test AL on VUS
Chi-square = 122.93, df = 13, p-value < 2.2e-16
alternative hypothesis: true diff in VUS is not equal to 0
 percent confidence interval:
 NA NA
sample estimates:
 VUS of FACTOR1    VUS of ktemp     VUS of kpar   VUS of kfront  VUS of zpsy004 
      0.7282689       0.7517546       0.5545725       0.6568242       0.7241812 
 VUS of zpsy005  VUS of zpsy006    VUS of zinfo   VUS of zbentc   VUS of zbentd 
      0.5219222       0.5987500       0.6795676       0.5865334       0.3470005 
 VUS of zboston VUS of zmentcon  VUS of zworflu    VUS of zassc 
      0.5728167       0.5320187       0.5675800       0.6300100 

>  DiagTest3Grp.Test(dat=AL,paired=TRUE,type="Youden",p=0,q=0,conf.level=0.95)

	Chi-Sqaure test

data:  Test AL on Youden
Chi-square = 164.91, df = 13, p-value < 2.2e-16
alternative hypothesis: true diff in Youden is not equal to 0
 percent confidence interval:
 NA NA
sample estimates:
 Youden of FACTOR1    Youden of ktemp     Youden of kpar   Youden of kfront 
         0.5892511          0.5959572          0.4250516          0.4996535 
 Youden of zpsy004  Youden of zpsy005  Youden of zpsy006    Youden of zinfo 
         0.6040473          0.3744770          0.4531280          0.5213547 
  Youden of zbentc   Youden of zbentd  Youden of zboston Youden of zmentcon 
         0.4555184          0.3121202          0.5076940          0.4276617 
 Youden of zworflu    Youden of zassc 
         0.4167880          0.4709709 

> 
>  ##normal test on 2 of the markers
>  new.AL <- subset(AL,select=c(group,ktemp,zbentd))
>  DiagTest3Grp.Test(dat=new.AL,paired=TRUE,type="VUS",p=0,q=0,conf.level=0.95)

	normal-test

data:  Test new.AL on VUS
Z-stat = 6.1573, mean = 0, sd = 1, p-value = 7.401e-10
alternative hypothesis: true diff in VUS is not equal to 0
95 percent confidence interval:
 0.2759142 0.5335941
sample estimates:
 VUS of ktemp VUS of zbentd 
    0.7517546     0.3470005 

>  DiagTest3Grp.Test(dat=new.AL,paired=TRUE,type="Youden",p=0,q=0,conf.level=0.95)

	normal-test

data:  Test new.AL on Youden
Z-stat = 4.8101, mean = 0, sd = 1, p-value = 1.508e-06
alternative hypothesis: true diff in Youden is not equal to 0
95 percent confidence interval:
 0.1681831 0.3994910
sample estimates:
 Youden of ktemp Youden of zbentd 
       0.5959572        0.3121202 

> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>