Skip to content

Dúvida função Anova pacote car - Medidas repetidas

5 messages · Diego Pujoni, John Fox, Rui Barradas

#
Dear Diego,

This is close enough to Spanish for me to understand it (I think).

Using Anova() in the car package for repeated-measures designs requires a
multivariate linear model for all of the responses, which in turn requires
that the data set be in "wide" format, with each response as a variable. In
your case, there are two crossed within-subjects factors and no
between-subjects factors. If this understanding is correct (but see below),
then you could proceed as follows, where the crucial step is reshaping the
data from "long" to "wide":

------------- snip --------------

Pa2$type.day <- with(Pa2, paste(Type, Day, sep="."))
(Wide <- reshape(Pa2, direction="wide", v.names="logbiovolume",
idvar="Replicate", timevar="type.day", drop=c("Type", "Day")))

day <- ordered(rep(c(0, 2, 4), each=2))
type <- factor(rep(c("c", "t"), 3))
(idata <- data.frame(day, type))

mod <- lm(cbind(logbiovolume.c.0, logbiovolume.t.0, logbiovolume.c.2,
logbiovolume.t.2, logbiovolume.c.4, logbiovolume.t.4) ~ 1, data=Wide)

Anova(mod, idata=idata, idesign=~day*type)

------------- snip --------------

This serves to analyze the data that you showed; you'll have to adapt it for
the full data set.

I'm assuming that the "replicates" are independent units, and that the
design is therefore entirely within replicate. If that's wrong, then the
analysis I've suggested is also incorrect.

I hope this helps,
 John

-----------------------------------------------
John Fox
Senator McMaster Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
#
Hello,

Yes, your Spanish is close enough to Portuguese for you to understand it.
I thought it was homework and didn't read untill the end. Apologies to 
Diego, and thanks to John.

Rui Barradas
Em 05-10-2012 22:48, John Fox escreveu:
#
Sorry,

Phone, daughter, forgot to sign.

Rui Barradas
Em 06-10-2012 12:28, Rui Barradas escreveu: