Multilocation {SASmixed}R Documentation

A multilocation trial

Description

The Multilocation data frame has 108 rows and 7 columns.

Format

This data frame contains the following columns:

obs
a numeric vector
Location
an ordered factor with levels B < D < E < I < G < A < C < F < H
Block
a factor with levels 1 to 3
Trt
a factor with levels 1 to 4
Adj
a numeric vector
Fe
a numeric vector
Grp
an ordered factor with levels B/1 < B/2 < B/3 < D/1 < D/2 < D/3 < E/1 < E/2 < E/3 < I/1 < I/2 < I/3 < G/1 < G/2 < G/3 < A/1 < A/2 < A/3 < C/1 < C/2 < C/3 < F/1 < F/2 < F/3 < H/1 < H/2 < H/3

Source

Littel, R. C., Milliken, G. A., Stroup, W. W., and Wolfinger, R. D. (1996), SAS System for Mixed Models, SAS Institute (Data Set 2.8.1).

Examples

library(SASmixed)
options(
  contrasts = c(unordered = "contr.SAS", ordered = "contr.poly"))
data(Multilocation)
formula( Multilocation )
names( Multilocation )
### Create a Block 
Multilocation$Grp <-
  getGroups( Multilocation, form = ~ Location/Block, level = 2 )
fm1Mult <- lme( Adj ~ Location * Trt, data = Multilocation, ~ 1 | Grp)
summary( fm1Mult )
VarCorr( fm1Mult )
anova( fm1Mult )
fm2Mult <- update( fm1Mult, Adj ~ Location + Trt )
fm3Mult <- update( fm1Mult, Adj ~ Location )
fm4Mult <- update( fm1Mult, Adj ~ Trt )
fm5Mult <- update( fm1Mult, Adj ~ 1 )
summary( fm2Mult )
VarCorr( fm2Mult )
anova( fm2Mult )
### Treating the location as a random effect
fm1MultR <- lme( Adj ~ Trt, data = Multilocation,
  random = list( Location = pdCompSymm( ~ Trt - 1 ), Block = ~ 1 ) )
summary( fm1MultR )
intervals( fm1MultR )
VarCorr( fm1MultR )
anova( fm1MultR )

fm2MultR <-
  update( fm1MultR, random = list( Location = ~ Trt - 1, Block = ~ 1 ))
anova( fm1MultR, fm2MultR )