createMainEffects: Create a simulated data set with main effects

Description Usage Arguments Details Value References See Also

View source: R/simulation.R

Description

X = BS + Γ G + U

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
createMainEffects(
  n.e = 1000,
  n.db = 70,
  n.ns = 30,
  label = "class",
  pct.imbalance = 0.5,
  sv.db = c("A", "B"),
  sv.ns = c("A", "B"),
  sd.b = 1,
  sd.gam = 1,
  sd.u = 1,
  conf = FALSE,
  distr.db = NA,
  p.b = 0.3,
  p.gam = 0.3,
  p.ov = p.b/2
)

Arguments

n.e

number of variables

n.db

sample size in database

n.ns

sample size in newsample

label

A character vector for the name of the outcome column. class for classification and qtrait for regression

pct.imbalance

A numeric percentage to indicate proportion of the imbalaced samples. 0 means all controls and 1 mean all cases.

sv.db

batches

sv.ns

batches

sd.b

a numeric for sd.b?

sd.gam

a numeric for sd.gam?

sd.u

a numeric for sd.u?

conf

a flag for conf?

distr.db

a numeric for distr.db?

p.b

a numeric for p.b?

p.gam

a numeric for p.gam?

p.ov

a numeric for p.ov?

Details

S = Biological group m G = Batch U = random error

NOTE: If you use conf=TRUE, then you must have exactly two surrogate variables in the database this function only allows for confounding in the database, not confounding in the new samples

Value

A list with:

db

database creation variables

vars

variables used in simulation

References

Leek,J.T. and Storey,J.D. (2007) Capturing heterogeneity in gene expression studies by surrogate variable analysis. PLoS Genet., 3, 1724–1735

See Also

Other simulation: createInteractions(), createMixedSimulation(), createSimulation(), splitDataset()


insilico/privateEC documentation built on May 22, 2020, 5:12 p.m.