Description Usage Arguments Value Examples
A causal mediation method with methylated region as the mediator
| 1 2 3 4 5 6 7 8 9 10 11 | 
| pheno | A vector of continuous or binary phenotypes (class: numeric). | 
| predictor | A vector of values for the exposure variable (class: numeric). | 
| region | A matrix of CpGs in a region. Each column is a CpG (class: data.frame). | 
| pos | A vector of CpG locations from the defined region and they are from the same chromosome (class: integer). | 
| order | A value for the order of bspline basis. 1: constant, 2: linear, 3: quadratic and 4: cubic. | 
| gbasis | A value for the number of basis being used for functional transformation on CpGs. | 
| covariate | A matrix of covariates. Each column is a covariate (class: data.frame). | 
| base | "bspline" for B-spline basis or "fspline" for Fourier basis. | 
| family | "gaussian" for continuous outcome or "binomial" for binary outcome. | 
1. pval$TE:   total effect (TE) p-value 
2. pval$DE:   direct effect (DE) p-value 
3. pval$IE:   indirect effect (IE) p-value 
4. pval_MX:   p-value for the association between methylation and exposure 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ################
### Examples ###
################
data("example_data")
predictor = data$exposure
region = data[,7:dim(data)[2]]
covariates = subset(data, select=c("age","gender"))
# binary outcome
pheno_bin = data$pheno_bin
mediation(pheno_bin, predictor, region, pos, covariate=covariates, order=4, 
gbasis=4, base="bspline", family="binomial")
# continuous outcome 
pheno_con = data$pheno_con
mediation(pheno_con, predictor, region, pos, covariate=covariates, order=4, 
gbasis=4, base="bspline", family="gaussian")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.