'ANOPA' is a library to perform proportion analyses. It is based on the F statistics (first developed by Fisher). This statistics is fully additive and can be decomposed in main effects and interaction effects, in simple effects in the decomposition of a significant interaction, in contrasts, etc. The present library performs these analyses and also can be used to plan statistical power for the analysis of proportions, obtain plots of the various effects, etc. It aims at replicating the most commonly-used ANOVA commands so that using this package should be easy.
The data supplied to an ANOPA can be in three formats: (i) long format, (ii) wide format, (iii) compiled format, or (iv) raw format. Check the 'anopa' commands for more precision (in what follow, we assume the compiled format where the proportions are given in a column name 'Freq')
The main function is
w <- anopa(formula, data)
where formula
is a formula giving the factors, e.g., "Freq ~ A * B".
For more details on the underlying math, see lc23;textualANOPA.
An omnibus analysis may be followed by simple effects or contrasts analyses:
emProportions(w, formula)
contrast(w, listOfContrasts)
As usual, the output can be obtained with
print(w) #implicite
summary(w) # or summarize(w) for the G statistics table
explain(w) # for human-readable output
Data format can be converted to other format with
toLong(w)
toWide(w)
toCompiled(w) # the only format that cannot be used as input to anopa
The package includes additional, helper, functions:
anopaPower2N()
to compute sample size given effect size;anopaN2Power()
to compute statistical power given a sample size;anopaPropTofsq()
to compute the effect size;anopaPlot()
to obtain a plot of the proportions with error bars;GRP()
to generate random proportions from a given design.
and example datasets, some described in the article:
ArringtonEtAl2002
illustrates a 3 x 2 x 4 design;ArticleExample1
illustrates a 4-way design;ArticleExample2
illustrates a 2 x 3 design;ArticleExample3
illustrates a (4) within-subject design;
The functions uses the following options:
ANOPA.feedback
'design', 'warnings', 'summary', 'all' or 'none';ANOPA.zeros
how are handled the zero trials to avoid 0 divided by 0 error;ANOPA.digits
for the number of digits displayed in the summary table.
Author
Maintainer: Denis Cousineau denis.cousineau@uottawa.ca [contributor]
Authors:
Louis Laurencelle louis.laurencelle@gmail.com [contributor]