[R] Simple Effects Analysis for ANOVA

robcinm robcinm at gmail.com
Thu Oct 13 07:45:09 CEST 2011


For an ANOVA class assignment, we are doing post-hoc tests for interactions.
For simple effect analysis on an interaction, I went through a really
convoluted process to get my statistics and want to know if there is a more
straightforward way.
 
I have a 3x2 design with self-concept 1:3 (low, moderate, high) and gender
1:2 (male, female). For the assignment, I am checking to see the influence
of interaction on some arbitrary score (the data is all made up for the sake
of the assignment). 

The first step I took was to create my data frame and then do an omnibus
F-test and check to see whether or not interaction is statistically
significant.

summary(aov(srl ~ gender * selfconcept, data=data))

The interaction is statistically significant. I plotted the interaction and
decided to do a simple effect analysis. This is where I was stuck. I am a
first year graduate student and very much an R novice. I am learning as I go
through my statistics classes so even though I am optimistic, this is a
rough to learn. I decided to create subsets of self-concept and test
post-hoc through one a series of one-way ANOVAs.

Low <- subset(data, selfconcept=="low")
Moderate <- subset(data, selfconcept=="moderate")
High <- subset(data, selfconcept=="high")

And then…

summary(aov(srl ~ gender, data=Low))
summary(aov(srl ~ gender, data=Moderate))
summary(aov(srl ~ gender, data=High))

This worked…kind of. It gave me the between groups mean square I needed but
an inaccurate error (for my purposes anyhow). I got the omnibus error term,
calculated the F ratio and used the F-table out of the book to determine
significance.

There is probably a much better and more efficient way of doing this, and I
need the advice of somebody who is much cleverer with R than I.


--
View this message in context: http://r.789695.n4.nabble.com/Simple-Effects-Analysis-for-ANOVA-tp3900635p3900635.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list