# Basic example using a two-factors design with the data in compiled format.
# Ficticious data present frequency of observation classified according
# to Intensity (three levels) and Pitch (two levels) for 6 possible cells.
minimalExample
# performs the omnibus analysis first (mandatory):
w <- anofa(Frequency ~ Intensity * Pitch, minimalExample)
summary(w)
# execute the simple effect of Pitch for every levels of Intensity
e <- emFrequencies(w, ~ Pitch | Intensity)
summary(e)
# As a check, you can verify that the Gs are decomposed additively
sum(e$results[,1])
w$results[3,1]+w$results[4,1]
# Real-data example using a two-factor design with the data in compiled format:
LandisBarrettGalvin2013
w <- anofa( obsfreq ~ provider * program, LandisBarrettGalvin2013)
anofaPlot(w)
summary(w)
# there is an interaction, so look for simple effects
e <- emFrequencies(w, ~ program | provider )
summary(e)
# Example from Gillet1993 : 3 factors for appletrees
Gillet1993
w <- anofa( Freq ~ species * location * florished, Gillet1993)
e <- emFrequencies(w, ~ florished | location )
# Again, as a check, you can verify that the Gs are decomposed additively
w$results[4,1]+w$results[7,1] # B + B:C
sum(e$results[,1])
# You can ask easier outputs with
summarize(w) # or summary(w) for the ANOFA table only
explain(w) # human-readable ouptut ((pending))
Run the code above in your browser using DataLab