Learn R Programming

aridagri (version 2.0.3)

anova_spd_ab_main: Split Plot Design with AB in Main Plot

Description

Performs ANOVA for Split Plot Design where main plot contains factorial combination of two factors (AB) and sub-plot contains factor C. Common in irrigation variety as main plot and nitrogen as sub-plot.

Usage

anova_spd_ab_main(
  data,
  response,
  main_factor1,
  main_factor2,
  sub_plot,
  replication,
  posthoc = "lsd",
  alpha = 0.05,
  verbose = TRUE
)

Value

List containing ANOVA table and means

Arguments

data

Data frame containing the experimental data

response

Name of the response variable

main_factor1

First factor in main plot (A)

main_factor2

Second factor in main plot (B)

sub_plot

Sub-plot factor (C)

replication

Name of replication 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

Details

Design structure:

  • Main Plot: A B factorial

  • Sub-Plot: C

  • Error (a): For testing A, B, and AB

  • Error (b): For testing C and all interactions with C

Examples

Run this code
data <- data.frame(
  rep = rep(1:3, each = 24),
  irrigation = rep(rep(c("I1", "I2"), each = 12), 3),
  variety = rep(rep(c("V1", "V2", "V3"), each = 4), 6),
  nitrogen = rep(c("N0", "N1", "N2", "N3"), 18),
  yield = rnorm(72, 1200, 150)
)
anova_spd_ab_main(data, response = "yield", 
                  main_factor1 = "irrigation", main_factor2 = "variety",
                  sub_plot = "nitrogen", replication = "rep")

Run the code above in your browser using DataLab