View source: R/PomaUnivariate.R
PomaUnivariate | R Documentation |
PomaUnivariate
performs parametric and non-parametric univariate statistical tests on a SummarizedExperiment
object to compare groups or conditions. Available methods include T-test, ANOVA, ANCOVA, Mann Whitney U Test (Wilcoxon Rank Sum Test), and Kruskal-Wallis.
PomaUnivariate(
data,
method = "ttest",
covs = NULL,
error = NULL,
paired = FALSE,
var_equal = FALSE,
adjust = "fdr",
run_post_hoc = TRUE
)
data |
A |
method |
Character. The univariate statistical test to be performed. Available options include "ttest" (T-test), "anova" (analysis of variance), "mann" (Wilcoxon rank-sum test), and "kruskal" (Kruskal-Wallis test). |
covs |
Character vector. Indicates the names of |
error |
Character vector. Indicates the name of a |
paired |
Logical. Indicates if the data is paired or not. Default is FALSE. |
var_equal |
Logical. Indicates if the data variances are assumed to be equal or not. Default is FALSE. |
adjust |
Character. Multiple comparisons correction method to adjust p-values. Available options are: "fdr" (false discovery rate), "holm", "hochberg", "hommel", "bonferroni", "BH" (Benjamini-Hochberg), and "BY" (Benjamini-Yekutieli). |
run_post_hoc |
Logical. Indicates if computing post-hoc tests or not. Setting this parameter to FALSE can save time for large datasets. |
A list
with the results.
Pol Castellano-Escuder
data("st000336")
# Perform T-test
st000336 %>%
PomaImpute() %>%
PomaUnivariate(method = "ttest")
# Perform Mann-Whitney U test
st000336 %>%
PomaImpute() %>%
PomaUnivariate(method = "mann", adjust = "fdr")
data("st000284")
# Perform Two-Way ANOVA
st000284 %>%
PomaUnivariate(method = "anova", covs = c("gender"))
# Perform Three-Way ANOVA
st000284 %>%
PomaUnivariate(method = "anova", covs = c("gender", "smoking_condition"))
# Perform ANCOVA with one numeric covariate and one factor covariate
# st000284 %>%
# PomaUnivariate(method = "anova", covs = c("age_at_consent", "smoking_condition"))
# Perform Kruskal-Wallis test
st000284 %>%
PomaUnivariate(method = "kruskal", adjust = "holm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.