Learn R Programming

agridat (version 1.8.1)

gomez.fractionalfactorial: Rice fractional factorial experiment

Description

A 1/2 fractional factorial experiment with 6 treatments. Two reps with 2 blocks in each rep.

Arguments

source

Gomez, K.A. and Gomez, A.A.. 1984, Statistical Procedures for Agricultural Research. Wiley-Interscience. Page 171-172. Used with permission of Kwanchai Gomez.

Details

Note: In Gomez, page 171 has (for example) treatment (1) in Rep 1, Block 2 and Rep 2, Block 1. Page 172 has treatment (1) in Block 1 of both reps. This data uses the layout shown on page 171.

Examples

Run this code
dat <- gomez.fractionalfactorial

# Gomez, Figure 4.8
with(dat, plot(y~x, type='n'))
with(dat, text(x,y,trt, col=as.numeric(block)))

# Split treatment into individual factors
dat <- transform(dat,
                 a = -1 + 2 * grepl('a',trt),
                  b = -1 + 2 * grepl('b',trt),
                 c = -1 + 2 * grepl('c',trt),
                 d = -1 + 2 * grepl('d',trt),
                 e = -1 + 2 * grepl('e',trt),
                 f = -1 + 2 * grepl('f',trt))

# Gomez table 4.24, trt SS totalled together.
# Why didn't Gomez nest block within rep?
m0 <- lm(yield~rep*block+trt, dat)
anova(m0)

# Gomez table 4.24, trt SS split apart
m1 <- lm(yield ~ rep * block + (a+b+c+d+e+f)^3, dat)
anova(m1)

# trt abcdef has the highest yield
desplot(yield~x*y, dat, main="gomez.fractionalfactorial")

# Not sure FrF2 works with multi-rep data.
require(FrF2)
aliases(m1)
MEPlot(m1)

Run the code above in your browser using DataLab