Statistics & probability

Aligned rank transform factorial test calculator for main effects and interaction

Each row names factor A, factor B and one independent response.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Each row names factor A, factor B and one independent response. Every combination must have the same number of replicates in this bounded analysis.

THE FORMULAY′A=residual+Amean−grand; Y′B=residual+Bmean−grand; Y′AB=residual+cell−Amean−Bmean+grand.

A worked example

Each term receives its own aligned response. Every aligned column sums to zero. Exchanging factor axes exchanges A/B results and preserves interaction; translation preserves every rank and F.

Good to know

Two fixed crossed factors with 2–4 levels each, balanced 3–20 independent replicates per cell, at most240 rows; diagnostics for zero aligned sums and zero nuisance F statistics. No repeated measures, unbalanced cells or ART-C post-hoc contrasts.

Describe a replicated crossed experiment

Each row names factor A, factor B and one independent response. Every combination must have the same number of replicates in this bounded analysis.

Factor codes identify categories; a numeric code is not a continuous covariate. Repeated observations from the same subject require a different error model.

Aligned term F statisticsAligned term F statisticsFactor A25.165Factor B12.263Interaction2.5641Each F uses its own aligned-and-ranked response; denominator df=8.
Scroll across to see the full diagram.
Each F uses its own aligned-and-ranked response; denominator df=8.

Compare this with the Two way factorial ANOVA calculator with interaction from raw data. Construct a separate aligned response for each main effect and interaction, midrank each aligned column and compute term-specific factorial F tests. Existing two-way ANOVA acts on original measurements under common normal errors.

Remove nuisance effects before ranking

For the A test, retain the A contribution and residual while removing B and interaction. Construct separate aligned columns for B and interaction.

Ranking the original outcome once does not provide valid interaction analysis. The required removal depends on which term is being tested. Alignment must be performed separately for A, B and their interaction. For an A test, subtract the fitted cell mean and restore only the A marginal effect; do the analogous construction for B. For the interaction, restore the interaction component after removing both marginal effects. Ranking the original measurements once and running all three F tests on those same ranks is not this method. The distinct aligned columns target distinct null effects, which is why the output contains a separate F statistic and residual calculation for each term rather than one universal rank table.

Use one term-specific rank analysis at a time

Midrank each aligned column, fit the complete factorial decomposition to those ranks and extract only the target term F test.

Other F statistics from that transformed column are alignment diagnostics or nuisance results. They are not substitutes for the corresponding separately aligned test.

Work through the checked default example

Each term receives its own aligned response. Every aligned column sums to zero. Exchanging factor axes exchanges A/B results and preserves interaction; translation preserves every rank and F.

Exact rational alignment gives F values 25.16504854 for A, 12.26347305 for B and 2.56410256 for interaction, each with numerator df1 and denominator df8. Corresponding probabilities are approximately 0.00103140,0.00805633 and0.14798220. The default2×2 design has three replicates per cell. Independent exact-fraction alignment gives F_A≈25.16504854, F_B≈12.26347305 and F_AB≈2.56410256. The first two effects are appreciably stronger than the interaction in this illustrative dataset. Ties can arise from the alignment arithmetic even when the original observations differ. To avoid splitting mathematically equal aligned values through floating-point noise, the implementation rounds aligned values to12 significant digits before midranking. This explicit numerical convention can merge values closer than that precision, so measurements requiring finer distinctions need a higher-precision analysis.

Check numerical ties and alignment identities

Each exact aligned column sums to zero. Nuisance main effects or interactions removed during alignment should have zero sums of squares before ranking.

Floating arithmetic can separate mathematically identical aligned values. Stable tie handling is needed; the independent examples use exact rational alignment to expose that error.

Keep interpretation attached to factorial hypotheses

The interaction asks whether the relationship between factors changes across their levels on the aligned-rank analysis. It is not a raw-unit interaction coefficient.

A significant main effect does not identify which level pairs differ. Ordinary contrasts on ART ranks are not automatically valid multifactor contrast procedures. The sum of an aligned response should be close to zero, providing a diagnostic for the subtraction step. However, a zero sum alone cannot verify a correct term alignment. Check the restored effect and the resulting rank pattern as well. The present implementation requires balanced cells with independent replicates and fixed crossed factors. It does not fit a repeated-measures covariance model, support missing cells or automatically produce ART-C contrasts. If subjects contribute to multiple cells, entering them as unrelated replicates understates the dependence and can invalidate the reported F reference probabilities.

Stay inside the supported design

Balance and complete cells make the alignment conventions visible. Missing cells, unequal replication and mixed effects require additional modeling decisions.

A table with one observation per cell has no independent residual estimate for this supported analysis. Nonparametric terminology does not eliminate the need for replication. When an aligned response is constant within cells, the residual rank variance may vanish. A finite F denominator cannot be manufactured from a machine epsilon in that case; the page rejects the unresolved test. Changing data solely to avoid this error would change the question. Instead inspect whether the design has enough genuine within-cell replication and measurement variation.

A few questions, answered

Why not rank responses once?

One ranking retains nuisance structure and can distort interaction tests. ART creates a different aligned response for each target term.

How are equal aligned values ranked?

They receive a common midrank. Numerical subtraction must not split an exact tie into artificial neighboring ranks.

Can I run ordinary pairwise contrasts afterward?

Not indiscriminately. Multifactor ART contrasts need a suitable alignment procedure such as ART-C, outside this page.

Does ART support repeated measures here?

This bounded version supports independent replicated balanced cells only.

Find your calculator

Start typing to explore the library.