Learn R Programming

agridat (version 1.5)

byers.apple: Diameters of apples

Description

Measurements of the diameters of apples

Usage

data(byers.apple)

Arguments

source

Schabenberger, Oliver and Francis J. Pierce. 2002. Contemporary Statistical Models for the Plant and Soil Sciences. CRC Press, Boca Raton, FL.

Details

Experiment conducted at the Winchester Agricultural Experiment Station of Virginia Polytechnic Institute and State University. Twentyfive apples were chosen from each of ten apple trees. Of these, there were 80 apples in the largest size class, 2.75 inches in diameter or greater. The diameters of the apples were recorded every two weeks over a 12-week period.

Examples

Run this code
dat <- byers.apple

library(lattice)
xyplot(diameter ~ time | factor(appleid), data=dat, type=c('p','l'))

# Overall fixed linear trend, plus random intercept/slope deviations
# for each apple.  Observations within each apple are correlated.
library(nlme)
m1 <- lme(diameter ~ 1 + time, data=dat,
          random = ~ time|appleid, method='ML',
          cor = corAR1(0, form=~ time|appleid),
          na.action=na.omit)
VarCorr(m1)

Run the code above in your browser using DataLab