Learn R Programming

aridagri (version 2.0.3)

anova_spd: ============================================================================ SPLIT PLOT DESIGN ANALYSIS FUNCTIONS (All Variations) Package: aridagri Author: Lalit Kumar Rolaniya ICAR-Indian Institute of Pulses Research, Regional Centre, Bikaner ============================================================================ Split Plot Design ANOVA (Standard)

Description

Performs complete ANOVA for Split Plot Design with proper error terms for main plot and sub-plot factors. Includes all standard post-hoc comparisons.

Usage

anova_spd(
  data,
  response,
  main_plot,
  sub_plot,
  replication,
  posthoc = "lsd",
  alpha = 0.05,
  verbose = TRUE
)

Value

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

Arguments

data

Data frame containing the experimental data

response

Name of the response variable

main_plot

Name of main plot factor

sub_plot

Name of sub-plot factor

replication

Name of replication/block factor

posthoc

Post-hoc test method

alpha

Significance level

verbose

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

Author

Lalit Kumar Rolaniya, ICAR-IIPR, Bikaner

Examples

Run this code
data <- data.frame(
  rep = rep(1:3, each = 12),
  irrigation = rep(rep(c("I1", "I2", "I3"), each = 4), 3),
  variety = rep(c("V1", "V2", "V3", "V4"), 9),
  yield = rnorm(36, 1200, 150)
)
anova_spd(data, response = "yield", main_plot = "irrigation", 
          sub_plot = "variety", replication = "rep")

Run the code above in your browser using DataLab