MyNixOS website logo
Description

Analyses of Proportions using Anscombe Transform.

Analyses of Proportions can be performed on the Anscombe (arcsine-related) transformed data. The 'ANOPA' package can analyze proportions obtained from up to four factors. The factors can be within-subject or between-subject or a mix of within- and between-subject. The main, omnibus analysis can be followed by additive decompositions into interaction effects, main effects, simple effects, contrast effects, etc., mimicking precisely the logic of ANOVA. For that reason, we call this set of tools 'ANOPA' (Analysis of Proportion using Anscombe transform) to highlight its similarities with ANOVA. The 'ANOPA' framework also allows plots of proportions easy to obtain along with confidence intervals. Finally, effect sizes and planning statistical power are easily done under this framework. Only particularity, the 'ANOPA' computes F statistics which have an infinite degree of freedom on the denominator. See Laurencelle and Cousineau (2023) <doi:10.3389/fpsyg.2022.1045436>.

ANOPA: Analysis of Proportions using Anscombe transform

CRANStatus

The library ANOPA provides easy-to-use tools to analyze proportions . With it, you can examine if proportions are significantly different (show an effect). In the case where there is more than one factor, you can also test if the interaction(s) are significant. You can also test simple effects (a.k.a. expected marginal analysis), as well as post-hoc tests (using Tukey’s Honestly Significant Difference test HSD). Finally, you can assess differences based on orthogonal contrasts. You can consult Laurencelle & Cousineau (2023) for details.

ANOPA also comes (a) with tools to make a plot of the proportions along with 95% confidence intervals [these intervals are adjusted for pair- wise comparisons; Cousineau, Goulet, & Harding (2021)]; (b) with tools to compute statistical power given some a priori expected proportions or sample size to reach a certain statistical power; (c) to generate random proportions if you wish to perform Monte Carlo simulations on proportions. In sum, eveything you need to analyse proportions!

The main function is anopa() which returns an omnibus analysis of the proportions for the factors given. For example, if you have a data frame ArticleExample2 which contains a column called s where the number of successes per group are stored, and a column called n where the group sizes are stored, then the following performs an analysis of proportions as a function of the groups based on the columns SES and MofDiagnostic:

w <- anopa( {s; n} ~ SES * MofDiagnostic, ArticleExample2 )
summary(w)
##                         MS  df        F   pvalue correction    Fcorr pvalcorr
## SES               0.022242   2 6.394845 0.001670   1.004652 6.365237 0.001720
## MofDiagnostic     0.001742   1 0.500966 0.479076   1.002248 0.499842 0.479569
## SES:MofDiagnostic 0.007443   2 2.140035 0.117651   1.040875 2.055997 0.127965
## Error(between)    0.003478 Inf

As the results suggest (consult the first three columns), there is a main effect of the factor SES (F(2, inf) = 6.395, p = .002). A plot of the proportions can be obtained easily with

anopaPlot(w) 

or just the main effect figure with

anopaPlot(w, ~ SES)

If the interaction had been significant, simple effects can be analyzed from the expected marginal frequencies with e <- emProportions(w, ~ SES | MofDiagnostic ).

Follow-up analyses include contrasts examinations with contrastProportions(); finally, post-hoc pairwise comparisons can be obtained with posthocProportions().

Prior to running an experiment, you might consider some statistical power planning on proportions using anopaPower2N() or anopaN2Power() as long as you can anticipate the expected proportions. A convenient effect size, the f-square and eta-square can be obtained with anopaPropTofsq().

Finally, toCompiled(), toLong() and toWide() can be used to present the proportion in other formats.

Installation

The official CRAN version can be installed with

install.packages("ANOPA")
library(ANOPA)

The development version 0.1.3 can be accessed through GitHub:

devtools::install_github("dcousin3/ANOPA")
library(ANOPA)

Note that the package ANOPA is named using UPPERCASE letters whereas the main function anopa() is written using lowercase letters.

The library is loaded with

library(ANOPA)

In sum

As seen, the library ANOPA makes it easy to analyze proportions using the same general vocabulary found in ANOVAs.

The complete documentation is available on this site.

A general introduction to the ANOPA framework underlying this library can be found at Laurencelle & Cousineau (2023).

References

Cousineau, D., Goulet, M.-A., & Harding, B. (2021). Summary plots with adjusted error bars: The superb framework with an implementation in R. Advances in Methods and Practices in Psychological Science, 4, 1–18. https://doi.org/10.1177/25152459211035109

Laurencelle, L., & Cousineau, D. (2023). Analysis of proportions using arcsine transform with any experimental design. Frontiers in Psychology, 13, 1045436. https://doi.org/10.3389/fpsyg.2022.1045436

Metadata

Version

0.1.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows