Perform statistical tests and return tidy results
tidy_results.Rd
This function takes a list of glmmTMB objects and performs statistical tests based on the estimated coefficients and their standard errors. The results are returned in a tidy data frame format.
Usage
tidy_results(
list_tmb,
coeff_threshold = 0,
alternative_hypothesis = "greaterAbs",
correction_method = "BH"
)
Arguments
- list_tmb
A list of glmmTMB objects representing the fitted models.
- coeff_threshold
A non-negative value which specifies a ln(fold change) threshold. The Threshold is used for the Wald test to determine whether the coefficient (β) is significant or not, depending on
alt_hypothesis
parameter. Default is 0, ln(FC = 1).- alternative_hypothesis
Alternative hypothesis for the Wald test (default is "greaterAbs"). Possible choice: "greater"
β > coeff_threshold, "less"
β < −coeff_threshold, or two-tailed alternative: "greaterAbs"
|β| > coeff_threshold
- correction_method
a character string indicating the correction method to apply to p-values. Possible values are: "holm", "hochberg", "hommel", #' "bonferroni", "BH", "BY", "fdr", and "none".
Examples
data(iris)
model_list <- fitModelParallel(formula = Sepal.Length ~ Sepal.Width + Petal.Length,
data = iris, group_by = "Species", n.cores = 1)
#> Log file location: /tmp/RtmpS86cq0/htrfit.log
#> CPU(s) number : 1
#> Cluster type : PSOCK
results_df <- tidy_results(model_list, coeff_threshold = 0.1, alternative_hypothesis = "greater")