Skip to content

Commit

Permalink
version 0.3-3
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglas Bates authored and gaborcsardi committed Jan 5, 2006
1 parent 4e7861a commit 369aa87
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 64 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2006-01-04 Douglas Bates <bates@stat.wisc.edu>

* man/BIB.Rd: Remove calls to gplot in this and other examples.

2005-04-01 Douglas Bates <bates@bates1-home>

* DESCRIPTION: Upgrade dependency to lme4_0.95-1 or later. Change
Expand Down
10 changes: 5 additions & 5 deletions DESCRIPTION
@@ -1,15 +1,15 @@
Package: SASmixed
Version: 0.3-2
Date: 2005-06-08
Version: 0.3-3
Date: 2006-01-05
Title: Data sets from "SAS System for Mixed Models"
Maintainer: Douglas Bates <bates@stat.wisc.edu>
Author: Original by Littel, Milliken, Stroup, and Wolfinger
modifications by Douglas Bates <bates@stat.wisc.edu>
Description: Data sets and sample lme analyses corresponding
to the examples in Littel, Milliken, Stroup and Wolfinger
(1996), "SAS System for Mixed Models", SAS Institute.
Depends: lme4 (>= 0.95-1)
Suggests: latticeExtra
Depends: Matrix (>= 0.99-1)
Suggests: lattice
LazyData: yes
License: GPL version 2 or later
Packaged: Wed Jun 8 11:27:06 2005; bates
Packaged: Thu Jan 5 17:14:30 2006; bates
16 changes: 10 additions & 6 deletions inst/doc/Usinglme.Rnw
Expand Up @@ -16,8 +16,7 @@
fontsize=\small}
%%\VignetteIndexEntry{lmer for SAS PROC MIXED Users}
%%\VignetteDepends{SASmixed}
%%\VignetteDepends{lme4}
%%\VignetteDepends{latticeExtra}
%%\VignetteDepends{lattice}
\begin{document}
\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=TRUE}
\SweaveOpts{prefix=TRUE,prefix.string=figs/f,include=FALSE}
Expand All @@ -30,12 +29,12 @@
<<preliminaries,echo=FALSE,results=hide>>=
options(width=75, contrasts=c(unordered="contr.SAS",ordered="contr.poly"))
library(SASmixed)
library(latticeExtra)
library(lattice)
@
\section{Introduction}
\label{sec:intro}

The \code{lmer} function from the \code{lme4} library for \textsf{R} is used
The \code{lmer} function from the \code{Matrix} library for \textsf{R} is used
to fit linear mixed-effects models. It is similar in scope to the
\textsf{SAS} procedure \code{PROC MIXED} described in
\citet{litt:mill:stro:wolf:1996}.
Expand Down Expand Up @@ -272,7 +271,10 @@ at the beginning of your session.
\label{sec:AvgDailyGain}

<<adg1,fig=TRUE,echo=TRUE,width=5,height=6>>=
print(gplot(AvgDailyGain))
print(xyplot(adg ~ Treatment | Block, AvgDailyGain, type = c("g", "p", "r"),
xlab = "Treatment (amount of feed additive)",
ylab = "Average daily weight gain (lb.)", aspect = "xy",
index.cond = function(x, y) coef(lm(y ~ x))[1]))
@
\begin{figure}[tbp]
\centering
Expand All @@ -294,7 +296,9 @@ anova(fm2Adg)
\section{BIB}
\label{sec:BIB}
<<bib1,fig=TRUE,echo=TRUE,width=6,height=6>>=
print(gplot(BIB))
print(xyplot(y ~ x | Block, BIB, groups = Treatment, type = c("g", "p"),
aspect = "xy", auto.key = list(points = TRUE, space = "right",
lines = FALSE)))
@
\begin{figure}[tbp]
\centering
Expand Down
Binary file modified inst/doc/Usinglme.pdf
Binary file not shown.
45 changes: 0 additions & 45 deletions inst/doc/auto/Usinglme.el

This file was deleted.

Binary file modified inst/doc/figs/f-adg1.pdf
Binary file not shown.
Binary file modified inst/doc/figs/f-bib1.pdf
Binary file not shown.
Binary file removed inst/doc/figs/f-cult1.pdf
Binary file not shown.
Binary file removed inst/doc/figs/f-cultm1.pdf
Binary file not shown.
Binary file removed inst/doc/figs/f-demand1.pdf
Binary file not shown.
Binary file removed inst/doc/figs/f-hr1.pdf
Binary file not shown.
Binary file removed inst/doc/figs/f-mississippi1.pdf
Binary file not shown.
16 changes: 10 additions & 6 deletions man/AvgDailyGain.Rd
Expand Up @@ -39,13 +39,17 @@
}
\examples{
options(contrasts = c(unordered = "contr.SAS", ordered = "contr.poly"))
## plot of adg versus Treatment by Block
if (require("latticeExtra", quietly = TRUE)) gplot(AvgDailyGain)
fm1Adg <- lmer(adg ~ InitWt * Treatment - 1 + (1 | Block), AvgDailyGain)
summary(fm1Adg) # compare with output 5.1, p. 178
if (require("lattice", quietly = TRUE, character = TRUE)) {
## plot of adg versus Treatment by Block
xyplot(adg ~ Treatment | Block, AvgDailyGain, type = c("g", "p", "r"),
xlab = "Treatment (amount of feed additive)",
ylab = "Average daily weight gain (lb.)", aspect = "xy",
index.cond = function(x, y) coef(lm(y ~ x))[1])
}
# compare with output 5.1, p. 178
(fm1Adg <- lmer(adg ~ InitWt * Treatment - 1 + (1 | Block), AvgDailyGain))
anova(fm1Adg) # checking significance of terms
fm2Adg <- lmer(adg ~ InitWt + Treatment + (1 | Block), AvgDailyGain)
summary(fm2Adg)
(fm2Adg <- lmer(adg ~ InitWt + Treatment + (1 | Block), AvgDailyGain))
anova(fm2Adg)
summary(lmer(adg ~ InitWt + Treatment - 1 + (1 | Block), AvgDailyGain))
}
Expand Down
6 changes: 5 additions & 1 deletion man/BIB.Rd
Expand Up @@ -38,7 +38,11 @@
}
\examples{
options(contrasts = c(unordered = "contr.SAS", ordered = "contr.poly"))
if (require("latticeExtra", quietly = TRUE)) gplot(BIB)
if (require("lattice", quietly = TRUE, character = TRUE)) {
xyplot(y ~ x | Block, BIB, groups = Treatment, type = c("g", "p"),
aspect = "xy", auto.key = list(points = TRUE, space = "right",
lines = FALSE))
}
fm1BIB <- lmer(y ~ Treatment * x + (1 | Block), BIB)
summary(fm1BIB) # compare with Output 5.7, p. 188
anova(fm1BIB) # strong evidence of different slopes
Expand Down
6 changes: 5 additions & 1 deletion man/HR.Rd
Expand Up @@ -34,7 +34,11 @@
}
\examples{
options(contrasts = c(unordered = "contr.SAS", ordered = "contr.poly"))
if (require("latticeExtra", quietly = TRUE)) gplot(HR)
if (require("lattice", quietly = TRUE, character = TRUE)) {
xyplot(HR ~ Time | Patient, HR, type = c("g", "p", "r"), aspect = "xy",
index.cond = function(x, y) coef(lm(y ~ x))[1],
ylab = "Heart rate (beats/min)")
}
(fm1HR <- lmer(HR ~ Time * Drug + baseHR + (Time|Patient), HR)) # linear trend in time
anova(fm1HR)
\dontrun{
Expand Down

0 comments on commit 369aa87

Please sign in to comment.