Skip to content

ANOVA

2 messages · kayj, Kingsford Jones

#
Hi All,


I have about one hundred patients and all the patients had their glucose
measured on three different days. The days are all the same for all he
patients. So I have three measurement for each patient . I want to know
whether the day when the glucose was measured has an effect on the
measurements. I was thinking to use a single factor analysis of variance but
I am not sure how to do it in R. any other suggestion on dealing with this
problem is welcome.

Thanks,
#
On Thu, Mar 5, 2009 at 8:31 AM, kayj <kjaja27 at yahoo.com> wrote:
Two options for one-way ANOVA are aov(response ~ factor), or
lm(response ~ factor) followed by anova(lm.object).

But....this would probably be a bad idea.  I recommend Pinheiro and
Bates (2000), where there are many examples of modeling effects within
subjects over time.

Here's an example with a continuous time effect

library(nlme)
f1 <- lme(distance~age, data=Orthodont, random= ~1 + age|Subject,
weights=varPower())
plot(f1, distance~fitted(.)|Subject, abline=c(0,1))
intervals(f1)


hth,

Kingsford Jones