Learn R Programming

RPCLR (version 1.0)

GenerateData: Simulate a dataset from a 1:1 matched case control study

Description

Simulate a dataset from a 1:1 matched case control study

Usage

GenerateData(numstrat, NumType.BM, NumType.NS, mu.diff, rho)

Arguments

numstrat
number of matched pairs
NumType.BM
number of features with non-zero difference in means between cases and controls (i.e. biomarkers)
NumType.NS
number of features with identical means between cases and controls (i.e. noise)
mu.diff
Difference in means between cases and controls for biomarkers
rho
correlation between matched pairs for biomarkers only

Value

Data
a numeric data matrix of n (number of subjects) rows and p (number of features) columns
Out
a response vector of length n of binary indicators of case/control status
Strat
a vector of length n of matched pair (stratum) indicators

Details

Biomarkers and noise features are simulated as independent random variables following a Gaussian distribution with unit variance.

References

Balasubramanian, R., Houseman, E. A., Coull, B. A., Lev, M. H., Schwamm, L. H., Betensky, R. A. (2012). Variable importance in matched case-control studies in settings of high dimensional data, Submitted to Biostatistics.

See Also

GetVarImp

Examples

Run this code
## Simulate Data
MyDat <- GenerateData(50, 3, 7, 0.5, 0.4)
Dat <- MyDat$Data
Out <- MyDat$Out
Strat <- MyDat$Strat

Run the code above in your browser using DataLab