Analysis of Factorial Experiments
Overview
Convenience functions for analyzing factorial experiments using ANOVA or mixed models. aov_ez(), aov_car(), and aov_4() allow specification of between, within (i.e., repeated-measures), or mixed (i.e., split-plot) ANOVAs for data in long format (i.e., one observation per row), automatically aggregating multiple observations per individual and cell of the design. mixed() fits mixed models using lme4::lmer() and computes p-values for all fixed effects using either Kenward-Roger or Satterthwaite approximation for degrees of freedom (LMM only), parametric bootstrap (LMMs and GLMMs), or likelihood ratio tests (LMMs and GLMMs). afex_plot() provides a high-level interface for interaction or one-way plots using ggplot2, combining raw data and model estimates. afex uses type 3 sums of squares as default (imitating commercial statistical software).
Install
Health
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names: afex/tests/testthat/test-aov_car-basic.R (.Names: 2) '.Names' should be changed to 'names'.
NOTEdependencies in R coder-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Base package in Suggests/Enhances imported in NAMESPACE: ‘parallel’
r-devel-windows-x86_64
Base package in Suggests/Enhances imported in NAMESPACE: 'parallel'
- NOTE8 OK, 5 NOTE2026-09-08
- ERROR8 OK, 4 NOTE, 1 ERROR2026-09-07
- NOTE10 OK, 3 NOTE2026-07-16
- OK13 OK2026-07-13
- ERROR12 OK, 1 ERROR2026-07-11
Show 3 earlier changesHide 3 earlier changes
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 26 (2 internal)includes a package overview page
- Examples that run
- 100%19 run in a plain check (1 of them under a condition)
- Exported functions with examples
- 73%
- Documented parameters
- 80%
- Return-value docs
- 82%
- Help pages citing references
- 19%
- afex_plot: Publication Ready Plots for Experimental Designs
- afex_plot: Supported Models
- An Introduction to Mixed Models for Experimental Psychology PDF
- Analysis of Accuracy Data using ANOVA and binomial GLMMs
- ANOVA and Post-Hoc Contrasts: Reanalysis of Singmann and Klauer (2011)
- Mixed Model Example Analysis: Reanalysis of Freeman et al. (2010)
- Testing the Assumptions of ANOVAs
Downloads
Repository
- PRs merged (all time)
- 82%
- Median days to close, 50 most recently updated closed issues
- 16
- Median days to close, 50 most recently updated closed PRs
- 2
Stars over time
Forks over time
Issues over time
PRs over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/singmann/afex on 2026-10-11.
GitHub Pages site last deployed 2025-12-14
Dependencies
Installing afex adds 63 packages (34 with compiled code, 55 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, doBy 4.3 MB.
Show all 28 packagesHide all 28 packages
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.5-1Latest
- 1.5-02025-08-24 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.4-12024-09-01 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.3-12024-02-25 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.3-0
- 1.2-12023-01-09 · diff ↗
- 1.2-02022-10-31 · diff ↗
- 1.1-12022-04-30 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.1-02022-03-27 · diff ↗
- 1.0-12021-07-22 · diff ↗
- 1.0-02021-07-21 · diff ↗
Show 38 earlier eventsHide 38 earlier events
- RR 4.1.0 released · 2021-05-18
- 0.28-12021-01-12 · diff ↗
- 0.28-02020-09-20 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.27-2
- 0.26-02020-01-16 · diff ↗
- 0.25-12019-08-27 · diff ↗
- 0.24-1
- RR 3.6.0 released · 2019-04-26
- 0.23-02019-02-19 · diff ↗
- 0.22-1
- 0.21-22018-06-24 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 0.20-22018-04-04 · diff ↗
- 0.19-12018-01-08 · diff ↗
- 0.18-02017-05-26 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 0.17-8
- RR 3.3.0 released · 2016-05-03
- 0.16-12016-04-04 · diff ↗
- 0.15-22015-10-25 · diff ↗
- 0.14-22015-08-17 · diff ↗ ·
removed 2 exports
nice.anova, univadded 6 exports
afex_options, aov_4, aov_car, aov_ez, lmer_alt, nice - RR 3.2.0 released · 2015-04-16
- 0.13-145
- 0.12-1352014-11-03 · diff ↗
- 0.11-131
- 0.10-1132014-08-05 · diff ↗ ·
added 5 exports
set_default_contrasts, set_deviation_contrasts, set_effects_contrasts, set_sum_contrasts, set_treatment_contrasts - 0.9-109
- RR 3.1.0 released · 2014-04-10
- 0.8-94
- 0.7-902013-12-04 · diff ↗
- 0.6-822013-09-26 · diff ↗
- 0.5-712013-05-29 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 0.4-57
- 0.3-42
- 0.2-262012-08-09
- RR 2.15.0 released · 2012-03-30
Package metadata
- First published
- 2012-08-09
- Total releases
- 39 / 14 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 389 KB / 11 files
- Download size
- 4.2 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("afex")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.