Package: afex 1.4-1

afex: Analysis of Factorial Experiments

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).

Authors:Henrik Singmann [aut, cre], Ben Bolker [aut], Jake Westfall [aut], Frederik Aust [aut], Mattan S. Ben-Shachar [aut], Søren Højsgaard [ctb], John Fox [ctb], Michael A. Lawrence [ctb], Ulf Mertens [ctb], Jonathon Love [ctb], Russell Lenth [ctb], Rune Haubo Bojesen Christensen [ctb]

afex_1.4-1.tar.gz
afex_1.4-1.zip(r-4.5)afex_1.4-1.zip(r-4.4)afex_1.4-1.zip(r-4.3)
afex_1.4-1.tgz(r-4.4-any)afex_1.4-1.tgz(r-4.3-any)
afex_1.4-1.tar.gz(r-4.5-noble)afex_1.4-1.tar.gz(r-4.4-noble)
afex_1.4-1.tgz(r-4.4-emscripten)afex_1.4-1.tgz(r-4.3-emscripten)
afex.pdf |afex.html
afex/json (API)
NEWS

# Install 'afex' in R:
install.packages('afex', repos = c('https://singmann.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/singmann/afex/issues

Datasets:
  • fhch2010 - Data from Freeman, Heathcote, Chalmers, & Hockley
  • ks2013.3 - Data from Klauer & Singmann
  • laptop_urry - Replication of Laptop Note Taking Study
  • md_12.1 - Data 12.1 from Maxwell & Delaney
  • md_15.1 - Data 15.1 / 11.5 from Maxwell & Delaney
  • md_16.1 - Data 16.1 / 10.9 from Maxwell & Delaney
  • md_16.4 - Data 16.4 from Maxwell & Delaney
  • obk.long - O'Brien Kaiser's Repeated-Measures Dataset with Covariate
  • sk2011.1 - Data from Singmann & Klauer
  • sk2011.2 - Data from Singmann & Klauer
  • stroop - Stroop data from Lin et al.

On CRAN:

14.69 score 120 stars 15 packages 1.4k scripts 27k downloads 176 mentions 22 exports 63 dependencies

Last updated 3 months agofrom:ee9153a92b. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 19 2024
R-4.5-winOKNov 19 2024
R-4.5-linuxOKNov 19 2024
R-4.4-winOKNov 19 2024
R-4.4-macOKNov 19 2024
R-4.3-winOKNov 19 2024
R-4.3-macOKNov 19 2024

Exports:afex_optionsafex_plotaov_4aov_caraov_ezcompare.2.vectorsemsinteraction_plotlmerlmer_altmixedniceoneway_plotround_psround_ps_apaset_default_contrastsset_deviation_contrastsset_effects_contrastsset_sum_contrastsset_treatment_contraststest_levenetest_sphericity

Dependencies:abindbackportsbootbroomcarcarDataclicolorspacecowplotcpp11DerivdoBydplyrfansifarverFormulagenericsggplot2gluegtableisobandlabelinglatticelifecyclelme4lmerTestmagrittrMASSMatrixMatrixModelsmgcvmicrobenchmarkminqamodelrmunsellnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigplyrpurrrquantregR6RColorBrewerRcppRcppEigenreshape2rlangscalesSparseMstringistringrsurvivaltibbletidyrtidyselectutf8vctrsviridisLitewithr

afex_plot: Publication Ready Plots for Experimental Designs

Rendered fromafex_plot_introduction.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-09-01
Started: 2018-09-22

afex_plot: Supported Models

Rendered fromafex_plot_supported_models.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-09-01
Started: 2019-02-15

An Introduction to Mixed Models for Experimental Psychology

Rendered fromintroduction-mixed-models.pdf.asisusingR.rsp::asison Nov 19 2024.

Last update: 2018-03-26
Started: 2018-03-26

Analysis of Accuracy Data using ANOVA and binomial GLMMs

Rendered fromafex_analysing_accuracy_data.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-09-01
Started: 2020-05-05

ANOVA and Post-Hoc Contrasts: Reanalysis of Singmann and Klauer (2011)

Rendered fromafex_anova_example.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-09-01
Started: 2017-04-04

Mixed Model Reanalysis of RT data

Rendered fromafex_mixed_example.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-09-01
Started: 2017-04-04

Testing the Assumptions of ANOVAs

Rendered fromassumptions_of_ANOVAs.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2024-09-01
Started: 2021-07-07

Readme and manuals

Help Manual

Help pageTopics
Analysis of Factorial Experimentsafex-package afex
Methods for afex_aov objectsafex_aov-methods anova.afex_aov emm_basis.afex_aov print.afex_aov recover_data.afex_aov summary.afex_aov
Set/get global afex optionsafex_options
m-way Plot with Error Bars and Raw Dataafex_plot afex_plot.afex_aov afex_plot.default afex_plot.merMod afex_plot.mixed interaction_plot oneway_plot
Convenient ANOVA estimation for factorial designsaov_4 aov_car aov_ez
Compare two vectors using various tests.compare.2.vectors
Expected values of mean squares for factorial designs Implements the Cornfield-Tukey algorithm for deriving the expected values of the mean squares for factorial designs.ems
Data from Freeman, Heathcote, Chalmers, & Hockley (2010)fhch2010
Data from Klauer & Singmann (2013, Experiment 3)ks2013.3
Replication of Laptop Note Taking Study (Urry et al. 2021, Psych. Science)laptop_urry
Data 12.1 from Maxwell & Delaneymd_12.1
Data 15.1 / 11.5 from Maxwell & Delaneymd_15.1
Data 16.1 / 10.9 from Maxwell & Delaneymd_16.1
Data 16.4 from Maxwell & Delaneymd_16.4
p-values for fixed effects of mixed-model via lme4::lmer()lmer_alt mixed
Make nice ANOVA table for printing.nice nice.afex_aov nice.anova nice.mixed print.nice_table
O'Brien Kaiser's Repeated-Measures Dataset with Covariateobk.long
Predict method for 'afex_aov' objectspredict.afex_aov
Extract Residuals and Fitted Values from 'afex_aov' objectsfitted.afex_aov residuals.afex_aov
Helper functions for rounding p-valuesround_ps round_ps_apa
Set global contrastsset_default_contrasts set_deviation_contrasts set_effects_contrasts set_sum_contrasts set_treatment_contrasts
Data from Singmann & Klauer (2011, Experiment 1)sk2011.1
Data from Singmann & Klauer (2011, Experiment 2)sk2011.2
Stroop data from Lin et al. (2020, Psych. Science)stroop