Learn R Programming

aridagri (version 2.0.3)

anova_spd_c_main_ab_sub: Split Plot Design with C in Main Plot, AB in Sub-Plot

Description

Performs ANOVA for Split Plot Design where main plot contains single factor C and sub-plot contains factorial combination of AB.

Usage

anova_spd_c_main_ab_sub(
  data,
  response,
  main_plot,
  sub_factor1,
  sub_factor2,
  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_plot

Main plot factor (C)

sub_factor1

First factor in sub-plot (A)

sub_factor2

Second factor in sub-plot (B)

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

Examples

Run this code
data <- data.frame(
  rep = rep(1:3, each = 24),
  irrigation = rep(rep(c("I1", "I2", "I3"), each = 8), 3),
  variety = rep(rep(c("V1", "V2"), each = 4), 9),
  nitrogen = rep(c("N1", "N2", "N3", "N4"), 18),
  yield = rnorm(72, 1200, 150)
)
anova_spd_c_main_ab_sub(data, response = "yield",
                         main_plot = "irrigation",
                         sub_factor1 = "variety", sub_factor2 = "nitrogen",
                         replication = "rep")

Run the code above in your browser using DataLab