The transformation functions 'A()' performs the Anscombe transformation on a pair {number of success; number of trials} = {s; n} (where the symbol ";" is to be read "over". The function 'varA()' returns the theoretical variance from the pair {s; n}. Both functions are central to the ANOPA (Laurencelle and Cousineau 2023) . It was originally proposed by (Zubin 1935) and formalized by (Anscombe 1948) .

A(s, n)

varA(s, n)

Atrans(v)

SE.Atrans(v)

var.Atrans(v)

CI.Atrans(v, gamma)

prop(v)

CI.prop(v, gamma)

Arguments

s

a number of success;

n

a number of trials.

v

a vector of 0s and 1s.

gamma

a confidence level, default to .95 when omitted.

Value

A() returns a score between 0 and 1.57 where a s of zero results in A(0,n) tending to zero when the number of trials is large, and where the maximum occurs when s equals n and are both very large, so that for example A(1000,1000) = 1.55. The midpoint is always 0.786 irrespective of the number of trials A(0.5 * n, n) = 0.786. The function varA() returns the theoretical variance of an Anscombe transformed score. It is exact as n gets large, and overestimate variance when n is small. Therefore, a test based on this transform is either exact or conservative.

Details

The functions A() and varA() take as input two integers, s the number of success and n the number of observations. The functions Atrans(), SE.Atrans(), var.Atrans(), CI.Atrans(), prop() and CI.prop() take as input a single vector v of 0s and 1s from which the number of success and the number of observations are derived.

References

Anscombe FJ (1948). “The transformatin of poisson, binormial and negative-binomial data.” Biometrika, 35, 246–254. doi:10.1093/biomet/35.3-4.246 .

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

Zubin J (1935). “Note on a transformation function for proportions and percentages.” Journal of Applied Psychology, 19, 213–220. doi:10.1037/h0057566 .

Examples

# The transformations from number of 1s and total number of observations:
A(5, 10)
#> [1] 0.7853982
 
varA(5, 10)
#> [1] 0.02380952
 
# Same with a vector of observations:
Atrans( c(1,1,1,1,1,0,0,0,0,0) )
#> [1] 0.7853982
 
var.Atrans( c(1,1,1,1,1,0,0,0,0,0) )
#> [1] 0.02380952