Learn R Programming

WWGbook (version 1.0.0)

ratpup: ratpup data in Chapter 3

Description

The data come from a study in which 30 female rats were randomly assigned to receive one of three doses (High, Low, or Control) of an experimental compound.

Usage

data(ratpup)

Arguments

References

Pinheiro, J.C. and Bates, D.M., Mixed-effects models in S and S-PLUS, Springer-Verlag Inc., Berlin, New York, 2000. West, B., Welch, K. & Galecki, A, Linear Mixed Models: A Practical Guide Using Statistical Software, Chapman Hall / CRC Press, first edition, 2006.

Examples

Run this code
attach(ratpup)

###Figure 3.1:Boxplots to compare the distributions of birth weights for each treatment by sex combination graphically
library(lattice)  # trellis graphics
library(grid)

bwplot(weight ~ sex|treatment, data=ratpup,aspect = 2, ylab="Birth Weights", 
    xlab="SEX",main = "Boxplots of birth weights for levels of treatment by sex")

Run the code above in your browser using DataLab