Transformations | R Documentation |
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
\insertCitelc23ANOPA. It was originally proposed by
\insertCitez35ANOPA and formalized by \insertCitea48ANOPA.
A(s, n)
varA(s, n)
Atrans(v)
SE.Atrans(v)
var.Atrans(v)
CI.Atrans(v, gamma)
prop(v)
CI.prop(v, gamma)
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. |
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.
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.
# The transformations from number of 1s and total number of observations:
A(5, 10)
varA(5, 10)
# Same with a vector of observations:
Atrans( c(1,1,1,1,1,0,0,0,0,0) )
var.Atrans( c(1,1,1,1,1,0,0,0,0,0) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.