The function starts by fitting an ANOVA model to the data to check for overall
significance. If significant differences are found, it proceeds with pairwise
t-tests to explore differences between individual conditions.
The function then checks for normality of residuals using the Shapiro-Wilk test
and for homogeneity of variances using Levene's test. It constructs a hypothesis
string based on the results of the pairwise t-tests.
A directed graph is created to represent the relationships between the conditions.
The graph is then simplified to reflect the most direct relationships, which
are used to construct the final hypothesis string.
Descriptive statistics are generated for each condition using the
generate_descriptives() internal function.
The function returns a list with the following components:
hypothesis: A string representing the simplified relationships between conditions.
pairwise_t: The result of pairwise t-tests, if performed.
fit_summary: The summary of the ANOVA model.
descriptives: Descriptive statistics for each condition.
fit: The ANOVA model object.
shapiro_test: The result of the Shapiro-Wilk normality test.
levene_test: The result of Levene's test for homogeneity of variances.