Description Usage Arguments Value References Examples
View source: R/MWAS_bootstrapping.R
This function generates bootstrap replicates (non-parametric resampling) of a model testing for association between a given metabolite and a disease phenotype, and calculates the confidence interval of model coefficients. Confidence intervals are calculated using the adjusted bootstrap percentile (BCa) method.
1 2 |
metabo_SE |
SummarizedExperiment object. See "MWAS_SummarizedExperiment()". |
metabolite_id |
character vector corresponding to the id of the metabolite to be modeled. |
disease_id |
character vector corresponding to the id of the response to be modeled. |
confounder_ids |
optional character vector corresponding to the ids of covariates to be included in the model (e.g. age or gender). |
assoc_method |
character constant indicating the association method that will be used. Possible values for assoc_method are: "pearson" (pearson correlation), "spearman" (spearman correlation), "kendall" (kendall correlation), "linear" (linear regression) or "logistic" (logistic regression). |
iterations |
numeric value indicating the number of bootstrap replicates |
A list with 3 elements, each list element reporting the following information: i) object of class "boot"; ii) summary of the previous object; iii) 95-confidence interval of the metabolite model coefficient. For more details, check the function "boot()" from the "boot" package.
Davison AC, Hinkley, DV. (1997). Bootstrap Methods and Their Application. Cambridge University Press.
1 2 3 4 5 6 7 | ## Load data
data(targetMetabo_SE)
## Bootstrap model testing for association between diabetes (T2D) and 3OH-butyrate
MWAS_bootstrapping (targetMetabo_SE, metabolite_id = "3-Hydroxybutyrate",
disease_id = "T2D",assoc_method = "logistic",
iterations = 1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.