Learn R Programming

correctedAUC (version 0.0.3)

AUCest.Reiser: Calculate AUC corrected for measurement error based on Reiser's (2000) method

Description

Calculate AUC corrected for measurement error based on Reiser's (2000) method.

Usage

AUCest.Reiser( datFrame, sidVar = "subjID", obsVar = "y", grpVar = "grp", repVar = "myrep", alpha = 0.05)

Arguments

datFrame
a data frame with at least the following columns: y: numerical vector of observations; subjID: vector of subject ids; grp: group indicator: 1 means case; and 0 means conrol; myrep: integer vector indicating replication. should be consecutive positive integer starting from 1.
sidVar
character. variable name for subject id in the data frame datFrame.
obsVar
character. variable name for observations in the data frame datFrame.
grpVar
character. variable name for group indictor in the data frame datFrame.
repVar
character. variable name for replication indictor in the data frame datFrame.
alpha
confidence interval level $100(1-\alpha$%

Value

A list of 4 elements
AUC.c
AUC corrected for measurement error based on Reiser's (2000) method.
sd.AUC.c
standard error of the estimated AUC corrected for measurement error based on Reiser's (2000) method.
AUC.c.low
lower bound of the AUC.c.
AUC.c.upp
upper bound of the AUC.c.

References

Rosner B, Tworoger S, Qiu W (2015) Correcting AUC for Measurement Error. J Biom Biostat 6:270. doi:10.4172/2155-6180.1000270

Examples

Run this code
  set.seed(1234567)
  tt=genSimDataReiser(
       nX = 100, 
       nY = 100, 
       sigma.X2 = 1, 
       mu.X = 0.25, 
       sigma.Y2 = 1, 
       mu.Y = 0, 
       sigma.epsilon2 = 0.5, 
       sigma.eta2 = 0.5) 

  print(dim(tt$datFrame))
  print(tt$datFrame[1:2,1:3])
  print(tt$theta2)
  print(tt$mu.true)
  print(tt$AUC.true)

  res = AUCest.Reiser(
    datFrame = tt$datFrame, 
    sidVar = "subjID",
    obsVar = "y",
    grpVar = "grp",
    repVar = "myrep",
    alpha = 0.05)
  print(res)

Run the code above in your browser using DataLab