a.- Anova Between group
From the OBrienKaiser database we stated the experiment with two intergroup factors with between.factor argument. For convenience (shorter name) the name “dat” are assigned to the database.
dat=OBrienKaiser; head(dat)
Note that the between factors listed in between.factor must match their names in the database.
between.factor= c('treatment','gender')
Anova.fnc(dat, between.factor=between.factor, dv='pre.1')
Mandatory arguments for this example are obviously the name of the database (dat), the names of between factors (between.factor) and the dependent variable (dv) on which we want to observe the fixed effects (pre.1) .
Output between Anova
The default for this type of Anova function will give you:
ANOVA table
Levene test
Size effect
Observed power
Descriptives statistics
Barplot with confidence intervals accordig Masson y Loftus(2003) for each estimated fixed effect.
Let see other arguments:
Anova.fnc(dat, between.factor=between.factor, dv='pre.1', to.pdf=T, type=2)
If we want to save the charts in a pdf external document, we include the argument to.pdf = T. The file will be named as graphics_anova.pdf. If do you want another name for the file, include the argument name with the word that you want to be included as part of the name (Ex. name='myname').
The argument type = 2, tells the function that we want an estimate of sums of squared effects with type II (In cases when the number of subjects is different for between factor levels).