Learn R Programming

diffMeanVar (version 0.0.6)

genSimData.tDistr: Generating simulated data set from t distributions

Description

Generating simulated data set from t distributions.

Usage

genSimData.tDistr(
  nCpGs, 
  nCases, 
  nControls,
  df0 = 10, 
  ncp0 = 0, 
  df1 = 6, 
  ncp1 = 2.393, 
  testPara = "var", 
  outlierFlag = FALSE,
  eps = 0.001, 
  applier = lapply)

Arguments

nCpGs

integer. Number of genes.

nCases

integer. Number of cases.

nControls

integer. Number of controls.

df0

integer. Degree of freedom for group 0 (controls).

ncp0

numeric. Non-centrality parameter for group 0 (controls).

df1

integer. Degree of freedom for group 1 (cases).

ncp1

numeric. Non-centrality parameter for group 1 (cases).

testPara

character string. Indicating if the test is for testing equal mean (testPara="mean"), for testing equal variance (testPara="var"), or for testing both equal mean and equal variance (testPara="both").

outlierFlag

logical. Indicating if outliers would be generated. If outlierFlag=TRUE, then we followed Phipson and Oshlack's (2014) simulation studies to generate one outlier for each CpG site by replacing the DNA methylation level of one diseased subject by the maximum of the DNA methylation levels of all CpG sites.

eps

numeric. If \(|mean_0-mean_1|<eps\) then we regard \(mean_0=mean_1\). Similarly, if \(|var_0-var_1|<eps\) then we regard \(var_0=var_1\). \(mean_0\) and \(var_0\) are the mean and variance of the t distribution for controls. \(mean_1\) and \(var_1\) are the mean and variance of the t distribution for cases.

applier

function name to do apply operation.

Value

An ExpressionSet object. The phenotype data of the ExpressionSet object contains 2 columns: arrayID (array id) and memSubj (subject membership, i.e., case (memSubj=1) or control (memSubj=0)). The feature data of the ExpressionSet object contains 4 elements: probe (probe id), gene (psuedo gene symbol), chr (psuedo chromosome number), and memGenes (indicating if a gene is differentially expressed (when testPara="mean") or indicating if a gene is differentially variable (when testPara="var") ).

References

Ahn S. and Wang T. (2013) A Powerful Statistical Method for Indentifying Differentially Methylated Markers in Complex Diseases. Pacific Symposium on Biocomputing. 69-79.

Phipson B, Oshlack A. DiffVar: A new method for detecting differential variability with application to methylation in cancer and aging. Genome Biol 2014; 15:465

Li X, Qiu W, Morrow J, DeMeo DL, Weiss ST, Fu Y, Wang X. (2015) A Comparative Study of Tests for Homogeneity of Variances with Application to DNA Methylation Data. PLoS ONE 10(12): e0145295. PMID: 26683022

Qiu W, Li X, Morrow J, DeMeo DL, Weiss ST, Wang X, Fu Y. New Score Tests for Equality of Variances in the Application of DNA Methylation Data Analysis [Version 2]. Insights Genet Genomics. (2017) 1: 3.2

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
<!-- %\dontrun{ -->
# }
# NOT RUN {
    # generate simulated data set from t distribution
    set.seed(1234567)
    es.sim = genSimData.tDistr(nCpGs = 100, nCases = 20, nControls = 20,
      df0 = 10, ncp0 = 0, df1 = 6, ncp1 = 2.393, testPara = "var",
      outlierFlag = FALSE, 
      eps = 1.0e-3, applier = lapply) 
    print(es.sim)
  
# }
# NOT RUN {
<!-- %} -->
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab