Description Format Details Source References Examples

Data on the breakage angle of chocolate cakes made with three different recipes and baked at six different temperatures. This is a split-plot design with the recipes being whole-units and the different temperatures being applied to sub-units (within replicates). The experimental notes suggest that the replicate numbering represents temporal ordering.

A data frame with 270 observations on the following 5 variables.

`replicate`

a factor with levels

`1`

to`15`

`recipe`

a factor with levels

`A`

,`B`

and`C`

`temperature`

an ordered factor with levels

`175`

<`185`

<`195`

<`205`

<`215`

<`225`

`angle`

a numeric vector giving the angle at which the cake broke.

`temp`

numeric value of the baking temperature (degrees F).

The `replicate`

factor is nested within the
`recipe`

factor, and `temperature`

is nested
within `replicate`

.

Original data were presented in Cook (1938), and reported in Cochran and Cox (1957, p. 300). Also cited in Lee, Nelder and Pawitan (2006).

Cook, F. E. (1938) *Chocolate cake, I. Optimum
baking temperature*. Master's Thesis, Iowa State College.

Cochran, W. G., and Cox, G. M. (1957) *Experimental
designs*, 2nd Ed. New York, John Wiley \& Sons.

Lee, Y., Nelder, J. A., and Pawitan, Y. (2006)
*Generalized linear models with random effects.
Unified analysis via H-likelihood*. Boca Raton, Chapman
and Hall/CRC.

1 2 3 4 5 6 7 8 9 | ```
str(cake)
## 'temp' is continuous, 'temperature' an ordered factor with 6 levels
(fm1 <- lmer(angle ~ recipe * temperature + (1|recipe:replicate), cake, REML= FALSE))
(fm2 <- lmer(angle ~ recipe + temperature + (1|recipe:replicate), cake, REML= FALSE))
(fm3 <- lmer(angle ~ recipe + temp + (1|recipe:replicate), cake, REML= FALSE))
## and now "choose" :
anova(fm3, fm2, fm1)
``` |

```
Loading required package: Matrix
'data.frame': 270 obs. of 5 variables:
$ replicate : Factor w/ 15 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
$ recipe : Factor w/ 3 levels "A","B","C": 1 1 1 1 1 1 2 2 2 2 ...
$ temperature: Ord.factor w/ 6 levels "175"<"185"<"195"<..: 1 2 3 4 5 6 1 2 3 4 ...
$ angle : int 42 46 47 39 53 42 39 46 51 49 ...
$ temp : num 175 185 195 205 215 225 175 185 195 205 ...
Linear mixed model fit by maximum likelihood ['lmerMod']
Formula: angle ~ recipe * temperature + (1 | recipe:replicate)
Data: cake
AIC BIC logLik deviance df.resid
1719.0519 1791.0203 -839.5259 1679.0519 250
Random effects:
Groups Name Std.Dev.
recipe:replicate (Intercept) 6.249
Residual 4.371
Number of obs: 270, groups: recipe:replicate, 45
Fixed Effects:
(Intercept) recipeB recipeC
33.12222 -1.47778 -1.52222
temperature.L temperature.Q temperature.C
6.43033 -0.71285 -2.32551
temperature^4 temperature^5 recipeB:temperature.L
-3.35128 -0.15119 0.45419
recipeC:temperature.L recipeB:temperature.Q recipeC:temperature.Q
0.08765 -0.23277 1.21475
recipeB:temperature.C recipeC:temperature.C recipeB:temperature^4
2.69322 2.63856 3.02372
recipeC:temperature^4 recipeB:temperature^5 recipeC:temperature^5
3.13711 -0.66354 -1.62525
Linear mixed model fit by maximum likelihood ['lmerMod']
Formula: angle ~ recipe + temperature + (1 | recipe:replicate)
Data: cake
AIC BIC logLik deviance df.resid
1709.5822 1745.5665 -844.7911 1689.5822 260
Random effects:
Groups Name Std.Dev.
recipe:replicate (Intercept) 6.237
Residual 4.475
Number of obs: 270, groups: recipe:replicate, 45
Fixed Effects:
(Intercept) recipeB recipeC temperature.L temperature.Q
33.1222 -1.4778 -1.5222 6.6109 -0.3855
temperature.C temperature^4 temperature^5
-0.5483 -1.2977 -0.9141
Linear mixed model fit by maximum likelihood ['lmerMod']
Formula: angle ~ recipe + temp + (1 | recipe:replicate)
Data: cake
AIC BIC logLik deviance df.resid
1708.1578 1729.7483 -848.0789 1696.1578 264
Random effects:
Groups Name Std.Dev.
recipe:replicate (Intercept) 6.229
Residual 4.540
Number of obs: 270, groups: recipe:replicate, 45
Fixed Effects:
(Intercept) recipeB recipeC temp
1.516 -1.478 -1.522 0.158
Data: cake
Models:
fm3: angle ~ recipe + temp + (1 | recipe:replicate)
fm2: angle ~ recipe + temperature + (1 | recipe:replicate)
fm1: angle ~ recipe * temperature + (1 | recipe:replicate)
Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
fm3 6 1708.2 1729.8 -848.08 1696.2
fm2 10 1709.6 1745.6 -844.79 1689.6 6.5755 4 0.1601
fm1 20 1719.0 1791.0 -839.53 1679.0 10.5304 10 0.3953
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.