ANOFA-package: ANOFA: Analyses of Frequency Data

ANOFA-packageR Documentation

ANOFA: Analyses of Frequency Data

Description

ANOFA is a library to perform frequency data analyses. It is based on the G 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 frequency, 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 ANOFA can be in three formats: (i) long format, (ii) wide format, (iii) compiled format, or (iv) raw format. Check the anofa commands for more precision (in what follow, we assume the compiled format where the frequencies are given in a column name Freq)

The main function is

w <- anofa(formula, data)

where formula is a formula giving the factors, e.g., "Freq ~ A * B".

For more details on the underlying math, see \insertCitelc23b;textualANOFA.

An omnibus analysis may be followed by simple effects or contrasts analyses: emFrequencies(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) toRaw(w) toTabulated(w) # the only format that cannot be used as input to anofa

The package includes additional, helper, functions:

  • powerXXX() to compute sample size given effect size;

  • anofaPlot() to obtain a plot of the frequencies with error bars;

  • effectsizeXXX() to compute the effect size;

  • grf() to generate random frequencies from a given design.

and example datasets, some described in the article:

  • LandisBarrettGalvin2013 illustrates a 5 x 3 design;

  • LightMargolin1971 illustrates a 5 x 2 design;

  • Gillet1993 illustrates a 2 x 3 x 2 design;

  • Detergent illustrates a 2 x 2 x 2 x 3 design;

The functions uses the following options:

  • ANOFA.feedback ((currently unused));

  • ANOFA.digits for the number of digits displayed in G statistics tables.

Details

ANOFA library for analyses of frequency data

Author(s)

Maintainer: Denis Cousineau denis.cousineau@uottawa.ca

Other contributors:

References

\insertAllCited

See Also

Useful links:


ANOFA documentation built on Nov. 18, 2023, 5:06 p.m.