[R] looking for help on repeated measure ANOVA
Christian Jost
jost at cict.fr
Thu Nov 28 20:31:05 CET 2002
I am new to R, therefore this might be a naive question, sorry in
advance for that.
I have data on 4 groups of mice (#of subjects: 8,8,8,9) where the
first group is the control group and 2-4 are 3 doses of a
neuro-inhibitor. For each mouse we measured the exploration time of a
familiar and a new object (thus repeated measure design), and I want
to test whether there are different exploration times between
'familiar' and 'new' and whether drug treatment has an effect on
exploration plus the combined effect. Checking out the mailing list
archives I found the helpful page by J. Baron on R in psychology and
tried to adapt his example in chapter 6. Below you can find the
result, and I simply wanted to ask some more experienced statistitian
than me if I did the right thing with these data.
Thanks in advance, Christian.
souris.mat <- matrix(c(
54, 95,
45, 90,
19, 50,
21, 70,
13, 33,
33, 71,
52, 62,
46, 83,
16, 38,
34, 85,
23, 59,
40, 77,
26, 65,
16, 29,
36, 65,
41, 67,
52, 71,
34, 44,
73, 86,
43, 55,
34, 48,
40, 50,
34, 43,
35, 42,
60, 57,
38, 51,
55, 59,
59, 64,
38, 33,
38, 39,
39, 37,
54, 57,
38, 40), nrow = 33, byrow = T)
souris.mul <- cbind.data.frame(subj=1:33,
dm=factor(rep(1:4,c(8,8,8,9))),souris.mat)
# dm = dose medicament
dimnames(souris.mul)[[2]] <- c("subj","dm","objFam","objNFam")
# objFam = objet familier, objNFam = objet non-familier
souris.uni <- data.frame(effect = as.vector(souris.mat),
subj = factor(paste("s",rep(1:33,2),sep="")),
dm = factor(paste("dm",rep(rep(1:4,c(8,8,8,9)),2), sep="")),
familier = factor(paste("fam",rep(1:2,c(33,33)),sep="")),
row.names = NULL)
resultat <- summary(aov(effect ~ dm * familier + Error(subj + subj:familier),
data = souris.uni))
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list