run_statdecide {statdecideR}R Documentation

Run Statistical Decision Workflow

Description

Automatically checks normality, selects appropriate test (ANOVA or Kruskal-Wallis), performs post-hoc, and visualizes results with compact letter display (CLD). Returns all results as an object with optional console output.

Usage

run_statdecide(data, dep_var, group_vars, cld_offset = 5, verbose = TRUE)

Arguments

data

A data frame.

dep_var

Character. Name of the dependent variable.

group_vars

Character vector. One or two grouping variables.

cld_offset

Numeric. Vertical offset to place CLD labels above the boxplot (default: 5).

verbose

Logical. Whether to print progress messages and results (default: TRUE).

Value

A list containing:

normality_test

Results of Shapiro-Wilk test

main_effects

Results for each main effect

interaction

Interaction results (if 2 group_vars)

plots

List of ggplot objects

facet_plot

Faceted ggplot (if 2 group_vars)

heatmap

Heatmap ggplot (if 2 group_vars)

Examples

# Silent operation
results <- run_statdecide(data = df_nonparam, dep_var = "Pollen",
                         group_vars = c("Month","Time"), verbose = FALSE)

# With console output
run_statdecide(data = df_nonparam, dep_var = "Pollen", group_vars = "Month")

[Package statdecideR version 0.1.6 Index]