Contrast Analyses for Factorial Designs
Overview
Contrast analysis for factorial designs provides an alternative to the traditional ANOVA approach, offering the distinct advantage of testing targeted hypotheses. The foundation of this package is primarily rooted in the works of Rosenthal, Rosnow, and Rubin (2000, ISBN: 978-0521659802) as well as Sedlmeier and Renkewitz (2018, ISBN: 978-3868943214).
Analysis and API
- Added participant-level
rscores for within-subjects and mixed contrasts viawithin_score = "r". The existingLscore remains the default: useLwhen response magnitude matters andrwhen agreement with the predicted pattern matters. - Corrected sums of squares, pooled error variance, and effect sizes for between-subjects designs with unequal group sizes. Raw and aggregated input now use the same formulas, and effect-size conversions preserve contrast direction.
- Corrected the within-only
r_contrastcalculation to use the denominator degrees of freedom from its contrast test. The paper-ready report now uses the signedr_contrastconsistently and relates its square to the contrast-specific eta-squared measures.
Show all changes in 0.4.0Hide the rest of the changes in 0.4.0
- Extended competing-contrast support to the app. Favored and rival weights are standardized before their difference is analyzed, matching
lambda_diff(). - Added conservative
detect_design()suggestions based on replication, crossing, and nesting. Ambiguous data deliberately fall back to manual model selection. calc_contrast_aggregated()no longer requires an explicitdata = NULL.- Added the corrected mixed-design data set
rosenthal_tbl68_mixed; the historicalrosenthal_tbl68object remains available for compatibility. - Reduced hard dependencies by replacing small uses of
dplyr,Hmisc,lifecycle,readr,rlang,stringr, andtibblewith base R orforeign. The pipe remains available for backward compatibility.
Shiny app
- Restored stable, editable table-based model and contrast inputs. The model table shows automatic design suggestions but always permits manual changes.
- Added categorized between-subjects, within-subjects, and mixed examples. Each example loads the model roles and planned weights documented in its source; examples with published rival hypotheses open in competing mode.
- Mixed designs now explicitly offer either a between × within contrast or a within contrast averaged across groups. Pure designs follow the roles in the model table without redundant activation controls.
- Added detailed variance-decomposition F tables with ordinary and partial eta squared, calculation tooltips, directional paper-ready reports, and interactive Plotly partitions of variation. Mixed output is explicitly based on participants' derived within-contrast scores rather than raw repeated outcomes.
- Reports can be copied as rich HTML with a plain-text fallback. F tables can be copied as aligned text or HTML and downloaded as dependency-free DOCX files.
- Added APA 7 citation-copy controls for the tutorial and software paper. The package-level
citation("cofad")command now returns both references. - Improved file validation, example-loading security, small-p-value formatting, table sizing and alignment, tooltips, collapsible panels, accessible colors, version display, and responsive copy controls.
Documentation, deployment, and testing
- Added the 2025 *Behavior Research Methods* tutorial as the primary citation, alongside the JOSS software paper.
- Expanded the README with current R, app, Docker, and webR examples; equations now use GitHub's native mathematical notation.
- Added a browser-only Shinylive/webR build with automatic GitHub Pages deployment and a containerized Shiny deployment through
Dockerfile. - Expanded numerical, validation, design-detection, example-preset, citation, export, and in-process Shiny server tests. GitHub Actions now check multiple R versions and platforms and publish test coverage.
- Verified the publication year and DOI metadata for Rosenthal, Rosnow, and Rubin (2000) and clarified the Sedlmeier and Renkewitz Table 16.1/16.2 distinction.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 33 (2 internal)includes a package overview page
- Examples that run
- 100%3 run in a plain check
- Exported functions with examples
- 30%
- Documented parameters
- 100%
- Return-value docs
- 44%
- Help pages citing references
- 6%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 7
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
11 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/johannes-titz/cofad on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-08-20 · The repository has a site deploy workflow
Show all practicesHide 3 practices
Dependencies
Installing cofad adds 72 packages (38 with compiled code, 73 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
Previously maintained by Markus Burkhardt (0.1.0 to 0.1.1).
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.4.0Latest
- 0.3.32025-05-15 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 0.3.22025-01-10 · diff ↗
- 0.3.12024-12-06 · diff ↗
- 0.3.02024-07-05 · diff ↗ ·
removed 1 export
pattern:^[[:alpha:]]+added 9 exports
%>%, calc_contrast, calc_contrast_aggregated, calc_r_alerting, calc_r_alerting_from_f, calc_r_contrast, calc_r_effectsize, lambda_diff, run_app - RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 0.1.12020-03-02 · diff ↗
- 0.1.02019-08-27
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-08-27
- Total releases
- 7 / 7 yrs
- License
- LGPL (>= 3) OSI · relicensed from GPL-2 in 0.3.0
- Minimum R
- ≥ 3.5
- Bundled data
- 5.8 KB / 16 files
- Download size
- 224 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("cofad")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.3758/s13428-025-02833-w, 10.21105/joss.03822.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.