Learn R Programming

aridagri (version 2.0.3)

anova_latin: Latin Square Design ANOVA

Description

Performs ANOVA for Latin Square Design with row and column blocking.

Usage

anova_latin(
  data,
  response,
  treatment,
  row,
  column,
  posthoc = "lsd",
  alpha = 0.05,
  verbose = TRUE
)

Value

List containing ANOVA results

Arguments

data

Data frame containing the data

response

Name of the response variable

treatment

Name of treatment factor

row

Name of row factor

column

Name of column 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
# 5x5 Latin Square
data <- data.frame(
  row = rep(1:5, each = 5),
  col = rep(1:5, 5),
  treatment = c("A","B","C","D","E", "B","C","D","E","A",
                "C","D","E","A","B", "D","E","A","B","C",
                "E","A","B","C","D"),
  yield = rnorm(25, 1200, 100)
)
anova_latin(data, response = "yield", treatment = "treatment",
            row = "row", column = "col")

Run the code above in your browser using DataLab