ANOM(mc, xlabel=NULL, ylabel=NULL, printn=TRUE, printp=TRUE,
stdep=NULL, stind=NULL, pst=NULL, pbin=NULL, bg="white",
bgrid=TRUE, axlsize=18, axtsize=25, npsize=5, psize=5,
lwidth=1, dlstyle="dashed", fillcol="darkgray")
glht
, SimCi
, mctp
, or binomRDci
involving group comparisons with the grand mean of all groups. See details.TRUE
.TRUE
.SimCi
is inserted for mc
, otherwise ignored. Default is NULL
.SimCi
is inserted for mc
, otherwise ignored. Default is NULL
.SimTest
. Only required if an object of class SimCi
is inserted for mc
and simultaneous p-values are to be printed (printp=TRUE
), otherwise ignored. Default is NULL
.binomRDtest
. Only required if an object of class binomRDci
is inserted for mc
and simultaneous p-values are to be printed (printp=TRUE
), otherwise ignored. Default is NULL
."white"
(default) or "gray"
(or "grey"
)?TRUE
.18
.25
.5
.5
.1
."dashed"
."darkgray"
.glht
object (created with function glht
from package multcomp
using a contrast matrix of type GrandMean
) for mc
. The glht
object must be based on one of the model types aov
, lm
, glm
, gls
, lme
, or lmer
. That is, ANOM is feasible not only for simple linear (ANOVA) models with Gaussian data, but indeed for a broad range of (semi-)parametric models e.g., with Poisson or binomial data, hierarchical and clustered structures, and more (Hothorn et al. 2008). If the underlying model is a Poisson or binomial GLM (involving log and logit link functions, respectively), the effects are automatically transformed back to counts (Poisson) or proportions (binomial). When analyzing binomial data, we need to distinguish between two data formats. As long as replicated observations of proportions are available for each group (i.e., a within-group variance can be estimated), we can fit a binomial GLM. However, if there is only one proportion per group (i.e., we have a 2-by-k data table), we need to fall back on some simpler procedure than a GLM. In the case of ANOM, we insert a binomRDci
object (created with function binomRDci
from package MCPAN
) for mc
with the contrasts being of type GrandMean
. If printing out simultaneous p-values with the ANOM decision chart is desired (printp=TRUE
), a binomRDtest
object (generated with function binomRDtest
) must be inserted for pbin
(see examples). Notice that printn=TRUE
prints the total sample size per group when inserting an object of class binomRDci
for mc
; by contrast, inserting a glht
object based on a binomial GLM makes printn=TRUE
print the number of independent observations of proportions per group. There are two options for coping with heterogeneous variances. The 'standard' version using glht
objects is basically designed for homoscedastic data but can also cope with unequal variances by employing sandwich covariance estimates (Herberich et al. 2010). All you have to do is set the option vcov=vcovHC
in the glht
call (see examples). A different heterogeneity adjustment using multiple Satterthwaite degrees of freedom (Hasler and Hothorn 2008) is invoked by inserting a SimCi
object (created with function SimCiDiff
from package SimComp
with the setting covar.equal=FALSE
) for mc
. Notice that covar.equal=TRUE
would compute a 'standard' multiple contrast test assuming equal variances, which is just the opposite of what we want. Another instance when the SimComp
package proves useful is for ANOM with ratios i.e., we assess each group's percentage change in comparison to the grand mean (which is always 100%). Again, we insert an object of class SimCi
for mc
but now we generated it with function SimCiRatio
instead of SimCiDiff
. Setting covar.equal
to TRUE
gives the homoscedastic version whereas FALSE
calls the heteroscedastic variant using multiple degrees of freedom. All ANOM functionality based on objects from SimComp
requires you to submit the data (dependent and independent variable via stdep
and stind
, respectively) separately (see examples). Moreover, if you wish to print simultaneous p-values with your ANOM decision chart, you may compute them using function SimTestDiff
or SimTestRat
and insert the resulting object for pst
. Again, don't forget to set the option covar.equal=FALSE
if you want to account for heteroscedasticity. Make sure in all cases to perform comparisons of type GrandMean
. Nonparametric ANOM is performed by inserting an object of class mctp
(created with function mctp
from package nparcomp
) for mc
. It is based on estimation of relative effects via global pseudo-rankings as proposed by Konietschke et al. (2012). This procedure can naturally cope with heteroscedasticity in the data. The relative effect of two independent random variables X_1 and X_2 following some distributions F_1 and F_2, respectively, is generally defined as
$$p = P(X_1<X_2) + 0.5 P(X_1=X_2).$$
Loosely speaking, p is the probability that X_1 takes smaller values than X_2 (plus half the probability of taking equal values). Hence when p<0.5, X_1 is stochastically more likely to take larger values than X_2, and vice versa for p>0.5. Creating the mctp
object requires to specify a grand-mean-type contrast matrix by hand (see examples) as it is not among the options provided by the package nparcomp
. For the test statistics you may choose one out of three asymptotic approximation methods:
asy.method="mult.t"
), which works reasonably well most of the time,
asy.method="normal"
), which is unfavorable with small sample sizes,
asy.method="fisher"
), which ensures that the decision limits preserve the range of [-1, 1].
correlation
in the function mctp
is set to TRUE
. Do not use the function nparcomp
instead of mctp
since it does not involve global ranking and is inoperative with ANOM-type contrast matrices.