Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

crampton.pig

Weight gain in pigs for different treatments


Description

Weight gain in pigs for different treatments, with initial weight and feed eaten as covariates.

Usage

data("crampton.pig")

Format

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

treatment

feed treatment

rep

replicate

weight1

initial weight

feed

feed eaten

weight2

final weight

Details

A study of the effect of initial weight and feed eaten on the weight gaining ability of pigs with different feed treatments.

The data are extracted from Ostle. It is not clear that 'replicate' is actually a blocking replicate as opposed to a repeated measurement. The original source document needs to be consulted.

Source

Crampton, EW and Hopkins, JW. (1934). The Use of the Method of Partial Regression in the Analysis of Comparative Feeding Trial Data, Part II. The Journal of Nutrition, 8, 113-123.

References

Bernard Ostle. Statistics in Research

Goulen. Methods of Statistical Analysis, 1st ed. Page 256-259.

Examples

library(agridat)

data(crampton.pig)
dat <- crampton.pig

dat <- transform(dat, gain=weight2-weight1)
libs(lattice)
# Trt 4 looks best
xyplot(gain ~ feed, dat, group=treatment, type=c('p','r'),
       auto.key=list(columns=5),
       xlab="Feed eaten", ylab="Weight gain", main="crampton.pig")

# Basic Anova without covariates
m1 <- lm(weight2 ~ treatment + rep, data=dat)
anova(m1)
# Add covariates
m2 <- lm(weight2 ~ treatment + rep + weight1 + feed, data=dat)
anova(m2)
# Remove treatment, test this nested model for significant treatments
m3 <- lm(weight2 ~ rep + weight1 + feed, data=dat)
anova(m2,m3) # p-value .07. F=2.34 matches Ostle

agridat

Agricultural Datasets

v1.18
CC BY-SA 4.0
Authors
Kevin Wright [aut, cre] (<https://orcid.org/0000-0002-0617-8673>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.