LSD and HSD Critical Value Calculator

Description

Calculates Fisher’s Least Significant Difference (LSD) and Tukey’s Honestly Significant Difference (HSD) minimum mean differences using a stored studentized range table.

Usage

lsd_hsd_calculator(k, n_per_group, mse, df_error_input)

Arguments

k Integer. Number of groups (must be between 3 and 6).
n_per_group Numeric. Average sample size per group.
mse Numeric. Mean square error from the ANOVA.
df_error_input Numeric. Error degrees of freedom from the ANOVA.

Value

A list with elements:

lsd
The LSD minimum mean difference for significance.
hsd
The HSD minimum mean difference for significance.
parameters_used
A list containing the closest df used, q-value, and t-critical value from the lookup table.

Examples

library("psych350lab")

# Calculate LSD and HSD for a 4-group ANOVA
result <- lsd_hsd_calculator(
  k = 4,
  n_per_group = 25,
  mse = 10.5,
  df_error_input = 96
)
result$lsd
[1] 1.842195
result$hsd
[1] 1.700136