Learn R Programming

aridagri (version 2.0.3)

anova_crd: ============================================================================ COMPREHENSIVE EXPERIMENTAL DESIGN ANALYSIS FUNCTIONS Package: aridagri Author: Lalit Kumar Rolaniya ICAR-Indian Institute of Pulses Research, Regional Centre, Bikaner ============================================================================ Completely Randomized Design (CRD) ANOVA

Description

Performs complete ANOVA for Completely Randomized Design with post-hoc tests, assumptions checking, and publication-ready output.

Usage

anova_crd(
  data,
  response,
  treatment,
  posthoc = "lsd",
  alpha = 0.05,
  verbose = TRUE
)

Value

List containing ANOVA table, means, post-hoc results, and diagnostics

Arguments

data

Data frame containing the experimental data

response

Name of the response variable (as string)

treatment

Name of treatment factor

posthoc

Post-hoc test: "lsd", "duncan", "tukey", "snk", "scheffe", or "all"

alpha

Significance level (default 0.05)

verbose

Logical. If TRUE (default), prints formatted output to console.

Author

Lalit Kumar Rolaniya, ICAR-IIPR, Bikaner

Examples

Run this code
data <- data.frame(
  treatment = rep(c("T1", "T2", "T3", "T4"), each = 5),
  yield = c(rnorm(5, 1200, 50), rnorm(5, 1350, 60), 
            rnorm(5, 1100, 55), rnorm(5, 1450, 65))
)
anova_crd(data, response = "yield", treatment = "treatment", posthoc = "all")

Run the code above in your browser using DataLab