block.covars: Data to compare the use of blocking and covariate adjustment

Description Format Details Examples

Description

Simulated data to illustrate the effects of blocking versus adjusting for a covariate.

Format

A data frame with 8 rows and 6 variables:

weight:

A baseline measurement of body weight for eight rats. The rows of the data frame are sorted according to weight (lightest to heaviest).

block:

Rats are grouped into four blocks based on body weight.

RBD:

Treatment group when using a randomised block design (RBD).

CRD:

Treatment group when using a completely randomised design (CRD).

y.RBD:

Outcome variable under the RBD.

y.CRD:

Outcome variable under the CRD.

Details

The experimental manipulation is a new diet versus a standard control diet and the outcome is the amount of food eaten on each diet. Since rats that weigh more at the beginning of the experiment are expected to eat more food, regardless of the diet, it would be beneficial to account for this source of variation. This can be done either through use of blocking or covariate adjustment and data for both designs are included. Note that only one design could be used in a real experiment but here we generate outcome values for two experiments using the same baseline body weight values.

For the randomised block design the eight rats are ranked according to baseline body weight and grouped into four blocks of two (the two lightest rats form the first block, the next two the second, and so on). Assignment to treatment group is done within blocks.

Examples

1
2
3
4
5
# Randomised block design
summary(aov(y.RBD ~ factor(block) + RBD, data=block.covars))

# Completely randomised design with weight as a covariate
summary(aov(y.CRD ~ weight + CRD, data=block.covars))

stanlazic/labstats documentation built on May 30, 2019, 9:41 a.m.