Title: | Aligned Rank Transform |
---|---|
Description: | The aligned rank transform for nonparametric factorial ANOVAs as described by Wobbrock, Findlater, Gergle, and Higgins (2011) <doi:10.1145/1978942.1978963>. Also supports aligned rank transform contrasts as described by Elkin, Kay, Higgins, and Wobbrock (2021) <doi:10.1145/3472749.3474784>. |
Authors: | Matthew Kay [aut, cre], Lisa A. Elkin [aut], James J. Higgins [aut], Jacob O. Wobbrock [aut] |
Maintainer: | Matthew Kay <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.11.1 |
Built: | 2024-11-23 06:06:32 UTC |
Source: | https://github.com/mjskay/artool |
Conduct analyses of variance on aligned rank transformed data.
## S3 method for class 'art' anova( object, response = c("art", "aligned"), type = c("III", "II", "I", 3, 2, 1), factor.contrasts = "contr.sum", test = c("F", "Chisq"), all.rows = FALSE, ... ) ## S3 method for class 'anova.art' print(x, verbose = FALSE, digits = 5, ...)
## S3 method for class 'art' anova( object, response = c("art", "aligned"), type = c("III", "II", "I", 3, 2, 1), factor.contrasts = "contr.sum", test = c("F", "Chisq"), all.rows = FALSE, ... ) ## S3 method for class 'anova.art' print(x, verbose = FALSE, digits = 5, ...)
object |
An object of class |
response |
Which response to run the ANOVA on: the aligned responses
( |
type |
Type of ANOVAs to conduct. If |
factor.contrasts |
The name of the contrast-generating function to be
applied by default to fixed effect factors. See the first element of
|
test |
Test statistic to use. Default |
all.rows |
Show all rows of the resulting ANOVA tables? By default
( |
... |
Additional arguments passed to |
x |
An object of class |
verbose |
When |
digits |
Digits of output in printed table; see |
This function runs several ANOVAs: one for each fixed effect term in the
model object
. In each ANOVA, the independent variables are the same,
but the response is aligned by a different fixed effect term (if response is
"aligned") or aligned and ranked by that fixed effect term (if response is
"art"). These models are generated using artlm
.
From each model, only the relevant output rows are kept (unless
all.rows
is TRUE
, in which case all rows are kept).
When response
is "art"
(the default), only one row is kept
from each ANOVA: the row corresponding to fixed effect term the response was
aligned and ranked by. These results represent nonparametric tests of
significance for the effect of each term on the original response variable.
When response
is "aligned"
, all rows except the row
corresponding to the fixed effect term the response was aligned by are kept.
If the ART procedure is appropriate for this data, these tests should have
all effects "stripped out", and have an F value of ~0. If that is not the
case, another analysis should be considered. This diagnostic is tested by
summary.art
and a warning generated if the F values are not
all approximately 0.
An object of class "anova"
, which usually is printed.
Matthew Kay
Wobbrock, J. O., Findlater, L., Gergle, D., and Higgins, J. J. (2011). The aligned rank transform for nonparametric factorial analyses using only ANOVA procedures. Proceedings of the ACM Conference on Human Factors in Computing Systems (CHI '11). Vancouver, British Columbia (May 7–12, 2011). New York: ACM Press, pp. 143–146. doi:10.1145/1978942.1978963
See art
for an example. See also
summary.art
, artlm
.
Apply the aligned rank transform to a factorial model (with optional
grouping terms). Usually done in preparation for a nonparametric analyses of
variance on models with numeric or ordinal responses, which can be done by
following up with anova.art
.
art( formula, data, rank.comparison.digits = -floor(log10(.Machine$double.eps^0.5)), check.errors.are.factors = TRUE )
art( formula, data, rank.comparison.digits = -floor(log10(.Machine$double.eps^0.5)), check.errors.are.factors = TRUE )
formula |
A factorial formula with optional grouping terms or error
terms (but not both). Should be a formula with a single response variable
(left-hand side) and one or more terms with all interactions on the
right-hand side, e.g. |
data |
An optional data frame containing the variables in the model. |
rank.comparison.digits |
The number of digits to round aligned
responses to before ranking (to ensure ties are computed consistently). See
the |
check.errors.are.factors |
Should we check to ensure |
The aligned rank transform allows a nonparametric analysis of variance to be
conducted on factorial models with fixed and random effects (or repeated
measures) and numeric or ordinal responses. This is done by first aligning
and ranking the fixed effects using this function, then conducting an
analysis of variance on linear models built from the transformed data using
anova.art
(see 'Examples'). The model specified using this
function must include all interactions of fixed effects.
The formula
should contain a single response variable (left-hand
side) that can be numeric, an ordered factor, or logical. The right-hand
side of the formula should contain one or more fixed effect factors, zero or
more grouping terms, and zero or more error terms. Error terms and grouping
terms cannot be used simultaneously. All possible interactions of the fixed
effect terms must be included. For example, y ~ x
and y ~
a*b*c
and y ~ a + b + b:c
are legal, but y ~ a + b
is not, as
it omits the interaction a:b
. Grouping terms are specified as in
lmer
, e.g. y ~ a*b*c + (1|d)
includes the random
intercept term (1|d)
. Error terms are specified as in
aov
, e.g. y ~ a*b*c + Error(d)
. Grouping terms and
error terms are not involved in the transformation, but are included in the
model when ANOVAs are conducted, see anova.art
.
For details on the transformation itself, see Wobbrock et al. (2011) or the ARTool website: https://depts.washington.edu/acelab/proj/art/.
An object of class "art"
:
call |
The call used to generate the transformed data. |
formula |
The formula used to generate the transformed data. |
cell.means |
A data frame of cell means for each fixed term and interaction on the right-hand side of formula. |
estimated.effects |
A data frame of estimated effects for each fixed term and interaction on the right-hand side of formula. |
residuals |
A vector of residuals (response - cell mean of highest-order interaction). |
aligned |
A data frame of aligned responses for each fixed term and interaction on the right-hand side of formula. |
aligned.ranks |
A data frame of aligned and ranked responses for each fixed term and interaction on the right-hand side of formula. |
data |
The input data frame |
n.grouping.terms |
The number of grouping variables in the input formula. |
For a complete description of cell means, estimated effects, aligned ranks, etc., in the above output, see Wobbrock et al. (2011).
Matthew Kay
Wobbrock, J. O., Findlater, L., Gergle, D., and Higgins, J. J. ARTool. https://depts.washington.edu/acelab/proj/art/.
Wobbrock, J. O., Findlater, L., Gergle, D., and Higgins, J. J. (2011). The aligned rank transform for nonparametric factorial analyses using only ANOVA procedures. Proceedings of the ACM Conference on Human Factors in Computing Systems (CHI '11). Vancouver, British Columbia (May 7–12, 2011). New York: ACM Press, pp. 143–146. doi:10.1145/1978942.1978963
summary.art
, anova.art
,
artlm
, artlm.con
, art.con
.
data(Higgins1990Table5, package = "ARTool") ## perform aligned rank transform m <- art(DryMatter ~ Moisture*Fertilizer + (1|Tray), data=Higgins1990Table5) ## see summary data to ensure aligned rank transform is appropriate for this data summary(m) ## looks good (aligned effects sum to 0 and F values on aligned responses ## not of interest are all ~0) ## we can always look at the anova of aligned data if we want more detail ## to assess the appropriateness of ART. F values in this anova should all ## be approx 0. anova(m, response="aligned") ## then we can run an anova on the ART responses (equivalent to anova(m, response="art")) anova(m) ## if we want contrast tests, we can use art.con(): ## Ex 1: pairwise contrasts on Moisture: art.con(m, "Moisture") ## Ex 2: pairwise contrasts on Moisture:Fertilizer: art.con(m, "Moisture:Fertilizer") ## Ex 3: difference-of-difference tests on the Moisture:Fertilizer interaction: art.con(m, "Moisture:Fertilizer", interaction = TRUE) ## The above three examples with art.con() can be constructed manually as well. ## art.con() extracts the appropriate linear model and conducts contrasts ## using emmeans(). If we want to use a specific method for post-hoc tests ## other than emmeans(), artlm.con(m, term) returns the linear model for the ## specified term which we can then examine using our preferred method ## (emmeans, glht, etc). The equivalent calls for the above examples are: library(emmeans) ## Ex 1: pairwise contrasts on Moisture: contrast(emmeans(artlm.con(m, "Moisture"), pairwise ~ Moisture)) ## Ex 2: pairwise contrasts on Moisture:Fertilizer: ## See artlm.con() documentation for more details on the syntax, specifically ## the formula passed to emmeans. contrast(emmeans(artlm.con(m, "Moisture:Fertilizer"), pairwise ~ MoistureFertilizer)) ## Ex 3: difference-of-difference tests on the Moisture:Fertilizer interaction: ## Note the use of artlm() instead of artlm.con() contrast( emmeans(artlm(m, "Moisture:Fertilizer"), ~ Moisture:Fertilizer), method = "pairwise", interaction = TRUE ) ## For a more in-depth explanation and example of contrasts with art and ## differences between interaction types, see vignette("art-contrasts")
data(Higgins1990Table5, package = "ARTool") ## perform aligned rank transform m <- art(DryMatter ~ Moisture*Fertilizer + (1|Tray), data=Higgins1990Table5) ## see summary data to ensure aligned rank transform is appropriate for this data summary(m) ## looks good (aligned effects sum to 0 and F values on aligned responses ## not of interest are all ~0) ## we can always look at the anova of aligned data if we want more detail ## to assess the appropriateness of ART. F values in this anova should all ## be approx 0. anova(m, response="aligned") ## then we can run an anova on the ART responses (equivalent to anova(m, response="art")) anova(m) ## if we want contrast tests, we can use art.con(): ## Ex 1: pairwise contrasts on Moisture: art.con(m, "Moisture") ## Ex 2: pairwise contrasts on Moisture:Fertilizer: art.con(m, "Moisture:Fertilizer") ## Ex 3: difference-of-difference tests on the Moisture:Fertilizer interaction: art.con(m, "Moisture:Fertilizer", interaction = TRUE) ## The above three examples with art.con() can be constructed manually as well. ## art.con() extracts the appropriate linear model and conducts contrasts ## using emmeans(). If we want to use a specific method for post-hoc tests ## other than emmeans(), artlm.con(m, term) returns the linear model for the ## specified term which we can then examine using our preferred method ## (emmeans, glht, etc). The equivalent calls for the above examples are: library(emmeans) ## Ex 1: pairwise contrasts on Moisture: contrast(emmeans(artlm.con(m, "Moisture"), pairwise ~ Moisture)) ## Ex 2: pairwise contrasts on Moisture:Fertilizer: ## See artlm.con() documentation for more details on the syntax, specifically ## the formula passed to emmeans. contrast(emmeans(artlm.con(m, "Moisture:Fertilizer"), pairwise ~ MoistureFertilizer)) ## Ex 3: difference-of-difference tests on the Moisture:Fertilizer interaction: ## Note the use of artlm() instead of artlm.con() contrast( emmeans(artlm(m, "Moisture:Fertilizer"), ~ Moisture:Fertilizer), method = "pairwise", interaction = TRUE ) ## For a more in-depth explanation and example of contrasts with art and ## differences between interaction types, see vignette("art-contrasts")
Conduct contrast tests following an Aligned Ranked Transform (ART) ANOVA
(anova.art
). Conducts contrasts on art
models
using aligned-and-ranked linear models using the ART (Wobbrock et al. 2011)
or ART-C (Elkin et al. 2021) alignment procedure, as appropriate to the requested contrast.
art.con( m, formula, response = "art", factor.contrasts = "contr.sum", method = "pairwise", interaction = FALSE, adjust, ... )
art.con( m, formula, response = "art", factor.contrasts = "contr.sum", method = "pairwise", interaction = FALSE, adjust, ... )
m |
An object of class |
formula |
Either a character vector or a formula specifying the fixed effects whose levels will be compared. See "Formula" section below. |
response |
Which response to use: the aligned response
( |
factor.contrasts |
The name of the contrast-generating function to be
applied by default to fixed effect factors. Sets the the first element of
|
method |
Contrast method argument passed to |
interaction |
Logical value. If |
adjust |
Character: adjustment method (e.g., "bonferroni") passed to
|
... |
An art
model m
stores the formula
and data
that were passed to art
when m
was created. Depending on the
requested contrast type, this function either extracts the linear model from m
needed to perform that contrast or creates a new linear model on data
aligned-and-ranked using the ART-C
procedure, then conducts the contrasts specified in parameter formula
.
Internally, this function uses artlm.con
(when interaction = FALSE
)
or artlm
(when interaction = TRUE
) to get the linear
model necessary for the requested contrast, computes estimated marginal
means on the linear model using emmeans
, and conducts contrasts
using contrast
.
An object of class emmGrid
. See contrast
for details.
Contrasts compare combinations of levels from multiple
factors. The formula
parameter indicates which factors are involved. Two
formats are accepted: (1) a character vector as used in
artlm
and artlm.con
, with factors separated by ":"
;
or (2) a formula as used in emmeans
, with factors separated by *
.
For example, contrasts comparing
combinations of levels of factors X1 and X2 can be expressed
as "X1:X2"
(character vector) or as ~ X1*X2
(formula).
Lisa A. Elkin, Matthew Kay, Jacob O. Wobbrock
Elkin, L. A., Kay, M, Higgins, J. J., and Wobbrock, J. O. (2021). An aligned rank transform procedure for multifactor contrast tests. Proceedings of the ACM Symposium on User Interface Software and Technology (UIST '21). Virtual Event (October 10–14, 2021). New York: ACM Press, pp. 754–768. doi:10.1145/3472749.3474784
Wobbrock, J. O., Findlater, L., Gergle, D., and Higgins, J. J. (2011). The aligned rank transform for nonparametric factorial analyses using only ANOVA procedures. Proceedings of the ACM Conference on Human Factors in Computing Systems (CHI '11). Vancouver, British Columbia (May 7–12, 2011). New York: ACM Press, pp. 143–146. doi:10.1145/1978942.1978963
data(Higgins1990Table5, package = "ARTool") library(dplyr) ## Perform aligned rank transform m <- art(DryMatter ~ Moisture*Fertilizer + (1|Tray), data=Higgins1990Table5) ## In a some workflows, contrast tests using ART-C would follow a ## significant omnibus effect found by running an anova on the ART responses ## (equivalent to anova(m, response="art")). ## If conducting planned contrasts, this step can be skipped. anova(m) ## We can conduct contrasts comparing levels of Moisture using the ART-C procedure. ## If conducting contrasts as a post hoc test, this would follow a significant effect ## of Moisture on DryMatter. ## Using a character vector art.con(m, "Moisture") ## Or using a formula art.con(m, ~ Moisture) ## Note: Since the ART-C procedure is mathematically equivalent to the ART procedure ## in the single-factor case, this is the same as ## emmeans(artlm(m, "Moisture"), pairwise ~ Moisture) ## art.con() returns an emmGrid object, which does not print asterisks ## beside "significant" tests (p < 0.05). If you wish to add stars beside ## tests of a particular significant level, you can always do that to the ## data frame returned by the summary() method of emmGrid. For example: art.con(m, ~ Moisture) %>% summary() %>% mutate(sig = ifelse(p.value < 0.05, "*", "")) ## Or a more complex example: art.con(m, ~ Moisture) %>% summary() %>% mutate(sig = symnum(p.value, corr = FALSE, na = FALSE, cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1), symbols = c("***", "**", "*", ".", " ") )) ## We can conduct contrasts comparing combinations of levels ## of Moisture and Fertilizer using the ART-C procedure. ## If conducting contrasts as a post hoc test, this would follow ## a significant Moisture:Fertlizer interaction effect on Drymatter. ## Using a character vector for formula art.con(m, "Moisture:Fertilizer") ## Using a formula art.con(m, ~ Moisture*Fertilizer) ## We can also conduct interaction contrasts (comparing differences of differences) art.con(m, "Moisture:Fertilizer", interaction = TRUE) ## For more examples, see vignette("art-contrasts")
data(Higgins1990Table5, package = "ARTool") library(dplyr) ## Perform aligned rank transform m <- art(DryMatter ~ Moisture*Fertilizer + (1|Tray), data=Higgins1990Table5) ## In a some workflows, contrast tests using ART-C would follow a ## significant omnibus effect found by running an anova on the ART responses ## (equivalent to anova(m, response="art")). ## If conducting planned contrasts, this step can be skipped. anova(m) ## We can conduct contrasts comparing levels of Moisture using the ART-C procedure. ## If conducting contrasts as a post hoc test, this would follow a significant effect ## of Moisture on DryMatter. ## Using a character vector art.con(m, "Moisture") ## Or using a formula art.con(m, ~ Moisture) ## Note: Since the ART-C procedure is mathematically equivalent to the ART procedure ## in the single-factor case, this is the same as ## emmeans(artlm(m, "Moisture"), pairwise ~ Moisture) ## art.con() returns an emmGrid object, which does not print asterisks ## beside "significant" tests (p < 0.05). If you wish to add stars beside ## tests of a particular significant level, you can always do that to the ## data frame returned by the summary() method of emmGrid. For example: art.con(m, ~ Moisture) %>% summary() %>% mutate(sig = ifelse(p.value < 0.05, "*", "")) ## Or a more complex example: art.con(m, ~ Moisture) %>% summary() %>% mutate(sig = symnum(p.value, corr = FALSE, na = FALSE, cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1), symbols = c("***", "**", "*", ".", " ") )) ## We can conduct contrasts comparing combinations of levels ## of Moisture and Fertilizer using the ART-C procedure. ## If conducting contrasts as a post hoc test, this would follow ## a significant Moisture:Fertlizer interaction effect on Drymatter. ## Using a character vector for formula art.con(m, "Moisture:Fertilizer") ## Using a formula art.con(m, ~ Moisture*Fertilizer) ## We can also conduct interaction contrasts (comparing differences of differences) art.con(m, "Moisture:Fertilizer", interaction = TRUE) ## For more examples, see vignette("art-contrasts")
Build a linear model for ART data with response aligned or aligned and ranked by the specified term from the model.
artlm( m, term, response = c("art", "aligned"), factor.contrasts = "contr.sum", ... )
artlm( m, term, response = c("art", "aligned"), factor.contrasts = "contr.sum", ... )
m |
An object of class |
term |
A character vector indicating the effect term
in the transformed data in |
response |
Which response to use: the aligned response
( |
factor.contrasts |
The name of the contrast-generating function to be
applied by default to fixed effect factors. Sets the the first element of
|
... |
This function is used primarily for post-hoc tests. To run an ANOVA, it does
not need to be called directly; instead, use anova.art
, which
calls this function as needed.
An object of class lm
if formula(m)
does not
contain grouping or error terms, an object of class merMod
(i.e. a model fit by lmer
) if it contains grouping terms, or
an object of class aovlist
(i.e. a model fit by aov
) if
it contains error terms.
Matthew Kay
See art
for an example. See also
anova.art
, which makes use of this function.
Given an art
model, build a linear model from data aligned or
aligned-and-ranked with ART-C alignment procedure by the specified term in
the model.
artlm.con(m, term, response = "art", factor.contrasts = "contr.sum", ...)
artlm.con(m, term, response = "art", factor.contrasts = "contr.sum", ...)
m |
An object of class |
term |
A character vector indicating the effect term in
the transformed data in |
response |
Which response to use: the aligned (with ART-C) response
( |
factor.contrasts |
The name of the contrast-generating function to be
applied by default to fixed effect factors. Sets the the first element of
|
... |
This function is used internally by art.con
to construct
linear models for contrasts using the ART-C procedure (Elkin et al. 2021).
It is typically not necessary to use this function directly to conduct contrasts using
the ART-C procedure, you can use art.con
instead, which will
ensure that the correct model and contrast test is run. However, should you
wish to use the ART-C procedure with a different contrast test
than provided by art.con
, you may with to use this function.
Internally, the ART-C procedure concatenates the variables specified
in term
, and then removes the originals. When specifying the effect
terms on which to conduct contrasts, use the concatenation of the effects
specified in term
instead of the original variables. This is demonstrated
in the example below.
An object of class lm
if formula(m)
does not
contain grouping or error terms, an object of class merMod
(i.e. a model fit by lmer
) if it does contain grouping terms, or
an object of class aovlist
(i.e. a model fit by aov
)
if it contains error terms.
Lisa A. Elkin
Elkin, L. A., Kay, M, Higgins, J. J., and Wobbrock, J. O. (2021). An aligned rank transform procedure for multifactor contrast tests. Proceedings of the ACM Symposium on User Interface Software and Technology (UIST '21). Virtual Event (October 10–14, 2021). New York: ACM Press, pp. 754–768. doi:10.1145/3472749.3474784
See also art.con
, which makes use of this function.
data(Higgins1990Table5, package = "ARTool") ## create an art model m <- art(DryMatter ~ Moisture*Fertilizer + (1|Tray), data=Higgins1990Table5) ## use emmeans to conduct pairwise contrasts on "Moisture" library(emmeans) contrast(emmeans(artlm.con(m, "Moisture"), pairwise ~ Moisture)) ## use emmeans to conduct pairwise contrasts on "Moisture:Fertilizer" ## N.B. internally, artlm.con concatenates the factors Moisture and Fertilizer ## to create MoistureFertilizer. If you try to use any of Moisture, Fertilizer, ## Moisture:Fertilizer, or Moisture*Fertilizer in the RHS of the formula ## passed to emmeans, you will get an error because the factors Moisture and Fertilizer ## do not exist in the model returned by artlm.con. contrast(emmeans(artlm.con(m, "Moisture:Fertilizer"), pairwise ~ MoistureFertilizer)) ## Note: art.con uses emmeans internally, and the above examples are equivalent to ## the following calls to art.con, which is the recommended approach as it will ## ensure the model selected and the contrasts extracted from emmeans match. art.con(m, "Moisture") art.con(m, "Moisture:Fertilizer")
data(Higgins1990Table5, package = "ARTool") ## create an art model m <- art(DryMatter ~ Moisture*Fertilizer + (1|Tray), data=Higgins1990Table5) ## use emmeans to conduct pairwise contrasts on "Moisture" library(emmeans) contrast(emmeans(artlm.con(m, "Moisture"), pairwise ~ Moisture)) ## use emmeans to conduct pairwise contrasts on "Moisture:Fertilizer" ## N.B. internally, artlm.con concatenates the factors Moisture and Fertilizer ## to create MoistureFertilizer. If you try to use any of Moisture, Fertilizer, ## Moisture:Fertilizer, or Moisture*Fertilizer in the RHS of the formula ## passed to emmeans, you will get an error because the factors Moisture and Fertilizer ## do not exist in the model returned by artlm.con. contrast(emmeans(artlm.con(m, "Moisture:Fertilizer"), pairwise ~ MoistureFertilizer)) ## Note: art.con uses emmeans internally, and the above examples are equivalent to ## the following calls to art.con, which is the recommended approach as it will ## ensure the model selected and the contrasts extracted from emmeans match. art.con(m, "Moisture") art.con(m, "Moisture:Fertilizer")
Synthetic data from an experiment with two within-subjects factors
(A
and B
) having two levels each.
A data frame with 32 observations on the following 4 variables.
a factor representing subjects with levels "s1"
.. "s8"
a factor with levels "a1"
"a2"
a factor with levels "b1"
"b2"
a numeric vector
Elkin, L. A., Kay, M, Higgins, J. J., and Wobbrock, J. O. (2021). An aligned rank transform procedure for multifactor contrast tests. Proceedings of the ACM Symposium on User Interface Software and Technology (UIST '21). Virtual Event (October 10–14, 2021). New York: ACM Press, pp. 754–768. doi:10.1145/3472749.3474784
data(ElkinAB, package = "ARTool") ## run contrast using the ART-C procedure on the data. m <- art(Y ~ A*B + (1|S), data = ElkinAB) art.con(m, "A:B")
data(ElkinAB, package = "ARTool") ## run contrast using the ART-C procedure on the data. m <- art(Y ~ A*B + (1|S), data = ElkinAB) art.con(m, "A:B")
Synthetic data from an experiment with three within-subjects factors
(A
, B
, and C
) having two levels each.
A data frame with 64 observations on the following 5 variables.
a factor representing subjects with levels "s1"
.. "s8"
a factor with levels "a1"
"a2"
a factor with levels "b1"
"b2"
a factor with levels "c1"
"c2"
a numeric vector
Elkin, L. A., Kay, M, Higgins, J. J., and Wobbrock, J. O. (2021). An aligned rank transform procedure for multifactor contrast tests. Proceedings of the ACM Symposium on User Interface Software and Technology (UIST '21). Virtual Event (October 10–14, 2021). New York: ACM Press, pp. 754–768. doi:10.1145/3472749.3474784
data(ElkinABC, package = "ARTool") ## run contrast using the ART-C procedure on the data. m <- art(Y ~ A*B*C + (1|S), data = ElkinABC) art.con(m, "A:B:C")
data(ElkinABC, package = "ARTool") ## run contrast using the ART-C procedure on the data. m <- art(Y ~ A*B*C + (1|S), data = ElkinABC) art.con(m, "A:B:C")
Synthetic data from a balanced 3x3 factorial experiment with main effects, no interaction, and independent and identically distributed (i.i.d.) Normal errors.
A data frame with 36 observations on the following 4 variables.
a factor with levels "s1"
.. "s36"
a factor with levels "r1"
.. "r3"
a factor with levels "c1"
.. "c3"
a numeric vector
Higgins, J. J., Blair, R. C. and Tashtoush, S. (1990). The aligned rank transform procedure. Proceedings of the Conference on Applied Statistics in Agriculture. Manhattan, Kansas: Kansas State University, pp. 185-195.
data(Higgins1990Table1, package = "ARTool") ## run aligned-rank transform and ANOVA on the data ## Note: because there is only one observation per Subject ## in this dataset, we do not need to include Subject as ## a grouping term in this formula. Indeed, if we did, ## lmer would complain when we attempt the ANOVA. m <- art(Response ~ Row*Column, data=Higgins1990Table1) anova(m)
data(Higgins1990Table1, package = "ARTool") ## run aligned-rank transform and ANOVA on the data ## Note: because there is only one observation per Subject ## in this dataset, we do not need to include Subject as ## a grouping term in this formula. Indeed, if we did, ## lmer would complain when we attempt the ANOVA. m <- art(Response ~ Row*Column, data=Higgins1990Table1) anova(m)
This dataset comes from a split-plot experiment examining Tray
s of 4
peat pots each. Moisture
was varied between Tray
s (i.e. it was
the whole-plot treatment) and Fertilizer
was varied within
Tray
s (i.e. it was the sub-plot treatment). The outcome measure was
DryMatter
.
A data frame with 48 observations on the following 4 variables.
a factor with levels "t1"
.. "t12"
a factor with levels "m1"
.. "m4"
a factor with levels "f1"
.. "f4"
a numeric vector
This dataset, originally from Milliken & Johnson (1984), is reproduced here from Higgins et al. (1990).
Milliken, G.A., Johnson, D.E. (1984). Analysis of Messy Data Vol I: Designed Experiments. Van Nostrand Reinhold Company, New York.
Higgins, J. J., Blair, R. C. and Tashtoush, S. (1990). The aligned rank transform procedure. Proceedings of the Conference on Applied Statistics in Agriculture. Manhattan, Kansas: Kansas State University, pp. 185-195.
See art
for a more complete example. See also
anova.art
.
data(Higgins1990Table5, package = "ARTool") ## run aligned-rank transform and ANOVA on the data m <- art(DryMatter ~ Moisture*Fertilizer + (1|Tray), data=Higgins1990Table5) anova(m)
data(Higgins1990Table5, package = "ARTool") ## run aligned-rank transform and ANOVA on the data m <- art(DryMatter ~ Moisture*Fertilizer + (1|Tray), data=Higgins1990Table5) anova(m)
Synthetic data from an experiment with two between-Subject
s factors
(A
and B
) having two levels each and one
within-Subject
s factor (C
) with two levels.
A data frame with 16 observations on the following 5 variables.
a factor with levels "s1"
.. "s8"
a factor with levels "a1"
"a2"
a factor with levels "b1"
"b2"
a factor with levels "c1"
"c2"
a numeric vector
Wobbrock, J. O., Findlater, L., Gergle, D., and Higgins, J. J. ARTool. https://depts.washington.edu/acelab/proj/art/.
data(HigginsABC, HigginsABC.art, package = "ARTool") ## run aligned-rank transform and ANOVA on the data m <- art(Y ~ A*B*C + Error(Subject), data = HigginsABC) anova(m)
data(HigginsABC, HigginsABC.art, package = "ARTool") ## run aligned-rank transform and ANOVA on the data m <- art(Y ~ A*B*C + Error(Subject), data = HigginsABC) anova(m)
See vignette("art-contrasts")
for a description of this data.
## see vignette("art-contrasts")
## see vignette("art-contrasts")
Summary and diagnostics for aligned rank transformed data
## S3 method for class 'art' summary(object, ...)
## S3 method for class 'art' summary(object, ...)
object |
An object of class |
... |
Potentially further arguments passed from other methods. |
This function gives diagnostic output to help evaluate whether the ART procedure is appropriate for an analysis. It tests that column sums of aligned responses are ~0 and that F values of ANOVAs on aligned responses not of interest are ~0. For more details on these diagnostics see Wobbrock et al. (2011).
An object of class "summary.art"
, which usually is printed.
Matthew Kay
Wobbrock, J. O., Findlater, L., Gergle, D., and Higgins, J. J. (2011). The aligned rank transform for nonparametric factorial analyses using only ANOVA procedures. Proceedings of the ACM Conference on Human Factors in Computing Systems (CHI '11). Vancouver, British Columbia (May 7–12, 2011). New York: ACM Press, pp. 143–146. doi:10.1145/1978942.1978963
See art
for an example. See also
anova.art
.