generate_Ho_from_pairwise_t {mmibain}R Documentation

Generate Null Hypothesis from Pairwise t-test Results

Description

This function generates a null hypothesis statement (Ho) from the results of pairwise t-tests. If pairwise t-tests are not available, it uses the hypothesis from the original study results.

Usage

generate_Ho_from_pairwise_t(original_study_results)

Arguments

original_study_results

A list containing the results of an original study, including a pairwise_t element if pairwise t-tests were conducted.

Details

The function checks if the pairwise_t element is present in the original_study_results list. If present, it extracts the p-values and the corresponding column and row names to identify all unique variables involved in the pairwise comparisons.

The unique variables are prefixed with "ColLabs" to denote the column labels from the original dataset. These variables are then concatenated with an equality sign to form the null hypothesis statement, which assumes no difference between any of the groups.

If the pairwise_t element is not present, indicating that no pairwise comparisons were made, the function returns the hypothesis generated by the original study results.

Value

A string representing the null hypothesis for the study.

Examples

Ho <- generate_Ho_from_pairwise_t(
          original_study_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]