c.- Anova Split-plot

The OBrienKaiser database is generated from a split-plot 3 x 2 x 3 x 5 design (treatement x gender x phase x hour). Treatment and gender are factors which are declared as between groups factors that we declare with the object between.factor. Phase and hour are the within factors (repeated measures factors) we declare them as list (within.factor).

For convenience (shorter name) we asign to dat this data base (OBrienKaiser).

dat=OBrienKaiser; head(dat)

We declare the design with the vector between.factor and the list within.factor.

between.factor= c('treatment','gender')

within.factor= list(phase = c('before','after','following'),

hour= 1:5 )

Note that both the names and levels of the repeated measures factors are completely arbitrary. Unlike intergroup factors that must be called by the same name which are in the database being analyzed.

Anova.fnc(dat, between.factor=between.factor, within.factor=within.factor,

col.start.rm=3, ylim=c(0,12), type=2)

As we have repeated measures, the function need to know in which column starts the 3 x 5 repeated measured conditions. If you look at the figure above you will see that in our case the repeated measures begin in column 3 of the data base. So, we indicate this with the argument: col.start.rm = 3. The argument ylim is optional an allows us to modify the scale of barplot's y axis. The user can go through trial and error until ylim assigning values ​​to achieve the desired spacing. Since the number of subjects for intergroup factor levels is not equal, an ANOVA model for estimating the square sums of type II (type = 2) is requested.

res.Anova.split.plot

The argument graphic acts by default as true (graphic = T). As we have more than three factors and this would lead to a large number of graphics, the function warns us that these graphs are saved to an external pdf file.

*** Warning. With more than three factors, the graphics are saved in pdf

*** The pdf file graphic_anova.pdf has been created in the working directory.

*** If you want another name for the file include the argument name ***

*** Ex: name = 'stress1' and it will create the file graph_anova_stress1.pdf ***

See CI graphics anova.split.plot

The default for this type of Anova function will give you:

  1. Anova table assuming sphericity

  2. Mauchly Sphericity test

  3. Greenhose-Geisser and Huynh-Felt non sphericity corrections

  4. Size effects wiht partical and semipartial eta square

  5. Observed power

  6. Descriptives statistics

  7. Barplot with confidence intervals accordig Masson y Loftus(2003) for each estimated fixed effect