# NOT RUN {
## Power Variance Family
# Data from Box and Cox (1964)
x <- (-1:1)
y <- c(674,370,292,338,266,210,170,118,90,1414,1198,634,1022,620,438,
442,332,220,3636,3184,2000,1568,1070,566,1140,884,360)
yarn.raw <- data.frame(expand.grid(x3=x, x2=x, x1=x), cycles=y)
yarn <- data.frame(x1=yarn.raw$x1, x2=yarn.raw$x2, x3=yarn.raw$x3,
cycles=yarn.raw$cycles)
attach(yarn)
ps.power <- list(theta=seq(1, 4, length = 20))
eq.power <- eql(cycles~x1+x2+x3, param.space=ps.power,
family=powerVarianceFamily("log"), smooth.grid=500)
plot(eq.power)
# }
# NOT RUN {
## Extended Binomial Variance Family
# Data from McCullagh & Nelder: GLM, p. 329
# (zeros replaced by 'NA')
site <- rep(1:9, each=10)
variety <- rep(1:10, 9)
resp <- c(0.05,NA,NA,0.10,0.25,0.05,0.50,1.30,1.50,1.50,
NA,0.05,0.05,0.30,0.75,0.30,3,7.50,1,12.70,1.25,1.25,
2.50,16.60,2.50,2.50,NA,20,37.50,26.25,2.50,0.50,0.01,
3,2.50,0.01,25,55,5,40,5.50,1,6,1.10,2.50,8,16.50,
29.50,20,43.50,1,5,5,5,5,5,10,5,50,75,5,0.10,5,5,
50,10,50,25,50,75,5,10,5,5,25,75,50,75,75,75,17.50,
25,42.50,50,37.50,95,62.50,95,95,95) / 100
ps.binomial <- list(seq(1, 2.2, length=32), seq(1, 3, length=32))
eq.binomial <- eql(resp~site*variety, param.space=ps.binomial,
family=extBinomialVarianceFamily())
plot(eq.binomial)
# }
Run the code above in your browser using DataLab