## Steve,

## please use the ancova function in the HH package.

install.packages("HH")
library(HH)


## windows.options(record=TRUE)
windows.options(record=TRUE)
# hypothetical data
beak.lgth <-
c(2.3,4.2,2.7,3.4,4.2,4.8,1.9,2.2,1.7,2.5,15,16.5,14.7,9.6,8.5,9.1,
  9.4,17.7,15.6,14,6.8,8.5,9.4,10.5,10.9,11.2,11.5,19,17.2,18.9,
  19.5,19.9,12.6,12.1,12.9,14.1,12.5,15,14.8,4.3,5.7,2.4,3.5,2.9)
mass <-
c(45.9,47.1,47.6,17.2,17.9,17.7,44.9,44.8,45.3,44.9,39,39.7,41.2,
  84.8,79.2,78.3,82.8,102.8,107.2,104.1,51.7,45.5,50.6,27.5,26.6,
  27.5,26.9,25.4,23.7,21.7,22.2,23.8,46.9,51.5,49.4,33.4,33.1,33.2,
  34.7,39.3,41.7,40.5,42.7,41.8)
## Make species into a factor
species <-
factor(c(1,1,1,2,2,2,3,3,3,3,4,4,4,5,5,5,5,6,6,6,7,7,7,
         8,8,8,8,9,9,9,9,9,10,10,10,11,11,11,11,12,12,12,12,12))
## then construct a data.frame with the three variables and the log
transforms
dataset <-  data.frame(species, beak.lgth, mass,
                       logBeak=log10(beak.lgth),
                       logMass=log10(mass))
## default is 7 colors, we need 12
trellis.par.set("superpose.line",
  Rows(trellis.par.get("superpose.line"), c(1:6, 1:6)))
trellis.par.set("superpose.symbol",
  Rows(trellis.par.get("superpose.symbol"), c(1:6, 1:6)))

ancova(logBeak ~ logMass       * species, data=dataset)
ancova(logBeak ~ logMass       + species, data=dataset)
ancova(logBeak ~ logMass, groups=species, data=dataset)
ancova(logBeak ~                 species, x=logMass, data=dataset)
bwplot(logBeak ~ species, data=dataset)

## Rich

	[[alternative HTML version deleted]]

