Learn R Programming

aridagri (version 2.0.3)

anova_factorial_3way: Three-Factor Factorial ANOVA

Description

Performs three-factor factorial ANOVA with all interactions.

Usage

anova_factorial_3way(
  data,
  response,
  factor1,
  factor2,
  factor3,
  replication = NULL,
  alpha = 0.05,
  verbose = TRUE
)

Value

List containing ANOVA results

Arguments

data

Data frame containing the data

response

Name of the response variable

factor1

Name of first factor (A)

factor2

Name of second factor (B)

factor3

Name of third factor (C)

replication

Name of replication factor (optional)

alpha

Significance level

verbose

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

Author

Lalit Kumar Rolaniya, Ram Lal Jat, Monika Punia, Raja Ram Choudhary

Examples

Run this code
data <- expand.grid(rep = 1:3, A = c("A1", "A2"), B = c("B1", "B2"), C = c("C1", "C2"))
data$yield <- rnorm(nrow(data), 1200, 150)
anova_factorial_3way(data, "yield", "A", "B", "C", "rep")

Run the code above in your browser using DataLab