Rev 4820 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{xmp10.05}\alias{xmp10.05}\title{data from Example 10.5}\description{The \code{xmp10.05} data frame has 20 rows and 2 columns of data froman experiment on the effect of alcohol on REM sleep time}\format{This data frame contains the following columns:\describe{\item{REMtime}{a numeric vector giving the rapid eye movement (REM) sleep timefor each rat during a 24-hour period}\item{ethanol}{a numeric vector giving the concentration of ethanol (alcohol) perbody weight administered to the rat (g/kg)}}}\details{}\source{Devore, J. L. (2000) \emph{Probability and Statistics for Engineeringand the Sciences (5th ed)}, Duxbury(1978), ``Relationship of ethanol blood level to REM and non-REM sleeptime and distribution in the rat'', \emph{Life Sciences}, 839-846.}\examples{data(xmp10.05)plot(REMtime ~ ethanol, data = xmp10.05,xlab = "Ethanol concentration administered (g/kg)",ylab = "Amount of REM sleep during a 24 hour period")fm1 <- lm(REMtime ~ factor(ethanol), data = xmp10.05)anova(fm1) # compare with Table 10.4, p. 417summary(fm1) # differences with baseline (0 g/kg)## more appropriate to use an ordered factorfm2 <- lm(REMtime ~ ordered(ethanol), data = xmp10.05)anova(fm2) # same as abovesummary(fm2) # polynomial contrasts## best model uses square root of ethanol concentrationplot(REMtime ~ sqrt(ethanol), data = xmp10.05,xlab = expression(sqrt(plain("Ethanol concentration administered (g/kg)"))),ylab = "Amount of REM sleep during a 24 hour period")fm3 <- lm(REMtime ~ sqrt(ethanol), data = xmp10.05)summary(fm3)abline(fm3)anova(fm3, fm1) # lack of fit testopar <- par(mfrow = c(2,2))plot(fm3, main = "Continuous fit to data in Example 10.5")par(opar)}\keyword{datasets}