HR {SASmixed} | R Documentation |
The HR
data frame has 120 rows and 5 columns of the heart
rates of patients under one of three possible drug treatments.
This data frame contains the following columns:
a
,
b
and p
where p
represents the placebo.
Littel, R. C., Milliken, G. A., Stroup, W. W., and Wolfinger, R. D. (1996), SAS System for Mixed Models, SAS Institute (Data Set 3.5).
options(contrasts = c(unordered = "contr.SAS", ordered = "contr.poly")) gplot(HR) (fm1HR <- lmer(HR ~ Time * Drug + baseHR + (Time|Patient), HR)) # linear trend in time anova(fm1HR) ## Not run: fm2HR <- update(fm1HR, weights = varPower(0.5)) # use power-of-mean variance summary(fm2HR) intervals(fm2HR) # variance function does not seem significant anova(fm1HR, fm2HR) # confirm with likelihood ratio ## End(Not run) (fm3HR <- lmer(HR ~ Time + Drug + baseHR + (Time|Patient), HR)) anova(fm3HR) (fm4HR <- lmer(HR ~ Time + baseHR + (Time|Patient), HR)) # remove Drug term anova(fm4HR)