Learn R Programming

correctedAUC (version 0.0.3)

genSimDataReiser: Generate one simulated data set based on Reiser's (2000) model

Description

Generate one simulated data set based on Reiser's (2000) model. The true AUC will also be calculated.

Usage

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)

Arguments

nX
integer. number of cases.
nY
integer. number of controls.
sigma.X2
variance of the true value for cases.
mu.X
mean of the true value for cases.
sigma.Y2
variance of the true value for controls.
mu.Y
mean of the true value for controls.
sigma.epsilon2
variance of the random error term for cases.
sigma.eta2
variance of the random error term for controls.

Value

A list of 4 elements:
datFrame
A data frame with 4 elements: y: observations; subjID: subject ID; grp: group indicator; myrep: replication indicator.
theta2
$(sigma.epsilon2 + sigma.eta2)/(sigma.X2 + sigma.Y2)$
mu.true
$mu.X-mu.Y$
AUC.true
true AUC value

Details

Reiser's (2000) measurement error model is: $$ X_{ik, obs}=X_{i,true}+\epsilon_{ik},\\ X_{i, true} \sim N\left(\mu_X, \sigma_X^2\right),\\ \epsilon_{ik} \sim N\left(0, \sigma_{\epsilon}^2\right),\\ i=1,\ldots, n_X, k=1, 2 $$ $$ Y_{jl, obs}=Y_{j,true}+\xi_{jl},\\ Y_{j, true} \sim N\left(\mu_Y, \sigma_Y^2\right),\\ \xi_{jl} \sim N(0, \sigma_{\eta}^2),\\ j=1,\ldots, n_Y, l=1, 2 $$

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)

Run the code above in your browser using DataLab