r_mediation_natural: r_mediation_natural : function to simulate DNA methylation...

Description Usage Arguments Details Value Examples

View source: R/mediation.R

Description

r_mediation_natural : function to simulate DNA methylation data for mediation analyzis (based on NaturalGWAS model)

Usage

1
2
3
r_mediation_natural(meth = NULL, eff.size.x = 100, eff.size.y = 100,
  n.x = 10, n.y = 10, n.xy = 5, k = NULL, chr = NULL,
  pos = NULL, window = 101, pca = NULL)

Arguments

meth

: methylation matrix

eff.size.x

: effect size of X on M

n.x

: number of causal CpGs associated with X

n.y

: number of causal CpGs associated with y

n.xy

: number of true mediators

k

: number of latent factors (need to be estimated with a pca)

chr

: chromosome

pos

: chromosome position

window

: distance between causal CpGs

pca

: a former pca with svd() function, speed the simulation (NULL by default)

eff.size.x

: effect size of Y on M

Details

Adaptation of the "simu_pheno" function of the "naturalgwas" package to simulate mediation data in high dimension

Value

causal.x : set of CpGs associated with the exposure

causal.y : set of CpGs associated with the outcome

causal.xy : set of true mediators

X : simulate phenotype

Y : simulate outcome

Examples

1
# Simulate data :

jumentib/useFonc documentation built on Nov. 18, 2019, 3:17 p.m.