[R] Two Factorial Experiment with a Single Control Group

Darcy Trimpe darcy.m.trimpe at wmich.edu
Thu Apr 23 12:06:07 CEST 2015


Thank you for the correction and the code. I had just discovered the repeated measure error myself yesterday :-). I had not thought of using a manova. This may work better than what I was going to do. Thanks again. 
----- Original Message -----

> From: "c06n [via R]" <ml-node+s789695n4706293h89 at n4.nabble.com>
> To: "Darcy Trimpe" <darcy.m.trimpe at wmich.edu>
> Sent: Thursday, April 23, 2015 2:47:35 AM
> Subject: Re: Two Factorial Experiment with a Single Control Group

> Hi,

> do you mean you didn't take any measurements before treatment, only
> after the fact? If so you used an inappropriate design.

> It should have been a repeated measures design (
> https://en.wikipedia.org/wiki/Repeated_measures_design ) and looked
> like this:

> no treatment | acute | 3 weeks
> day 1 measurement t1 | measurement t1 | measurements t1
> ...
> day 27 measurement t2 | measurement t2 | measurement t2

> Coming back to your question: Of course you can test the group
> differences from the measurements with a MANOVA (
> https://en.wikipedia.org/wiki/Multivariate_analysis_of_variance ,
> http://statmethods.net/stats/anova.html ). Treatment (acute, 3 week,
> no treatment) would be the 3-level-factor.

> Below the R code:

> # make data frame
> dataset <- data.frame(
> "treatment" = c("acute", "acute", "acute",
> "3weeks", "3weeks", "3weeks",
> "no", "no", "no"),
> "noTX" = c(7, 5, 4, 21, 28, 26, 3, 4, 7),
> "TX" = c(9, 8, 7, 23, 27, 29, 2, 5, 9),
> stringsAsFactors = TRUE
> )

> # plot
> # http://www.statmethods.net/advgraphs/ggplot2.html
> install.packages("ggplot2")
> require(ggplot2)
> p1 <- qplot(treatment, noTX, data = dataset, geom = c("boxplot",
> "jitter"),
> fill = treatment, main = "noTX", ylab = "Value")
> p2 <- qplot(treatment, TX, data = dataset, geom = c("boxplot",
> "jitter"),
> fill = treatment, main = "TX", ylab = "Value")
> p1; p2

> # MANOVA
> # http://statmethods.net/stats/anova.html
> #
> http://cran.r-project.org/web/packages/HSAUR/vignettes/Ch_analysis_of_variance.pdf
> fit <- manova(cbind(noTX, TX) ~ treatment, data = dataset)
> summary(fit)

> If you reply to this email, your message will be added to the
> discussion below:
> http://r.789695.n4.nabble.com/Two-Factorial-Experiment-with-a-Single-Control-Group-tp4706153p4706293.html
> To unsubscribe from Two Factorial Experiment with a Single Control
> Group, click here .
> NAML




--
View this message in context: http://r.789695.n4.nabble.com/Two-Factorial-Experiment-with-a-Single-Control-Group-tp4706153p4706299.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]



More information about the R-help mailing list