process_original_study {mmibain}R Documentation

Process Original Study Data for Analysis

Description

This function processes the original study data by performing ANOVA, post-hoc t-tests, and checking assumptions such as normality of residuals and homogeneity of variances.

Usage

process_original_study(df, alpha = 0.05)

Arguments

df

A data frame containing the study data, with columns ColLabs for labels and ColVals for values.

alpha

Significance level for the statistical tests, by default set to 0.05.

Details

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:

Value

A list containing elements for hypothesis, pairwise t-tests (if applicable), fit summary, descriptives, fit object, Shapiro-Wilk normality test result, and Levene's test result.

Examples

results <- process_original_study(df = generate_study_data(
                                       x = deal_cards_to_rc_grid(n = 3),
                                       sample_size = 30),
                                  alpha = 0.05)

[Package mmibain version 0.1.1 Index]