Skip to content

int3ract

2.0.0Package record

Johnson-Neyman Analysis of Two- and Three-Way Interactions

0packages depend
1.3Kdownloads / year
91.3%test coverage
13/13flavors OK

Overview

About

Reports and plots the conditional effect of each variable involved in a multiplicative interaction across the range of its moderators, together with the region over which that effect is distinguishable from zero. Extends the classic framework of Johnson and Neyman (1936) and Johnson and Fay (1950) doi:10.1007/BF02288864 to three-way interactions and to Bayesian models. The single entry point JN() dispatches on the fitted object, with methods for lm()/glm() models, 'lme4' models, 'RSiena' and 'multiSiena' results, and matrices of posterior draws; support for further model classes is added by writing one jn_input() method. Results are classed objects with print(), summary() and plot() methods, and the figures carry data-density panels showing how much empirical support each part of the moderator range has. A detailed introduction can be found in Krause (2026) doi:10.48550/arXiv.2604.22051.

Changes in 2.0.0

Bug fix

  • The two-way standard errors were wrong. Following the delta method, the variance of the conditional effect is Var(b_focal) + 2m Cov(b_focal, b_interaction) + m^2 Var(b_interaction), but the covariance term used was Cov(b_focal, b_other_main_effect) instead of the covariance with the interaction. Confidence bands, p values and therefore the regions of significance of every two-way frequentist analysis produced by version 1.0.x are affected, and results from those versions should be regenerated. Three-way analyses and all Bayesian analyses were computed correctly and are unchanged.

New interface

  • New generic JN(), which dispatches on the fitted object. It replaces JNK_freq() and JNK_bayes(), which split the package by inference paradigm rather than by input. Whether an analysis is frequentist or Bayesian now follows from the object handed in: models carrying point estimates and a covariance matrix are analysed with Wald tests, objects carrying draws as conditional posteriors.
Show all changes in 2.0.0Hide the rest of the changes in 2.0.0
  • New generic jn_input(), the extension point of the package, with methods for lm, glm, merMod, sienaFit, matrix, mcmc, mcmc.list, data.frame, sienaBayesFit and multiSiena. Supporting a further model class means writing one jn_input() method returning either jn_wald() (point estimates and covariance) or jn_posterior() (draws); nothing else needs to change. This covers, for instance, models fitted by variational inference, where the variational parameters approximate the posterior.
  • JN() returns a classed object with print(), summary(), plot(), autoplot(), as.data.frame(), coef() and vcov() methods. Analyses producing one result per group return a JN_list carrying the same methods. Figures are built on demand by plot() rather than stored in the result.
  • JNK_freq() and JNK_bayes() are deprecated. They still work, delegate to JN(), and return the 1.0.x layout, but warn once per session. They will be removed in a future release.

New features

  • summary() reports the regions of significance directly: the stretches of the moderator over which each conditional effect is distinguishable from zero, with the share of observations falling inside each. For two-way Wald analyses the boundaries are solved for exactly, so their precision no longer depends on range_size. Also available programmatically as jn_regions().
  • plot() attaches data-density panels: a histogram of the observed moderator values below two-way plots, and marginal histograms along both axes of the heatmaps. A region of significance covering moderator values that were hardly observed is the standard failure mode of this technique, and the panels make it visible. Observed values are taken from lm, glm and lme4 models automatically, and can be supplied for any other input through the support argument. Turn the panels off with jn_style(show_density = FALSE).
  • New jn_style() collects the colour and pattern settings that were previously repeated across both function signatures.
  • plot() draws a figure for every variable involved in the interaction, since each takes its turn as the focal one: two figures for a two-way analysis, three for a three-way one. Pass which for a single figure. It draws and returns invisibly, so nothing is rendered twice.
  • New jn_plots() returns every figure of an analysis at once without drawing them, and autoplot() returns a single one; jn_save() writes them to disk, replacing the save and folder arguments.
  • Two-way Bayesian analyses can be drawn as a posterior mean with credible band against the moderator (plot(x, type = "band")), directly comparable to the frequentist figure, in addition to the overlaid conditional densities.
  • For sienaBayes() results, the level the draws were taken from is now recorded on the result and shown by print(), summary() and the figures: Eta when the parameters involved are shared across groups, Mu when they vary and the hyper-parameter is used. Version 1.0.x labelled the figures this way; the information had been dropped.
  • hyper_only = FALSE no longer produces group-level analyses when none of the parameters involved varies between groups. It now reports that and returns the population-level analysis alone, since the group analyses would have been identical copies.

Other changes

  • The three-way extension is no longer called the Johnson-Neyman-Krause or JNK technique; it is referred to as JN3.
  • The default thresholds for Bayesian analyses are now c(alpha/2, 1 - alpha/2), that is c(0.025, 0.975). The previous default of c(0.49999999999999999, 0.5) marked essentially every cell significant. JNK_bayes() keeps the old default.
  • control_fdr is documented as what it is: the Benjamini-Hochberg step-up procedure controlling the false discovery rate across the moderator grid. Earlier documentation described it as Bonferroni-Holm.
  • dplyr, tibble, tidyr and scales are no longer dependencies. lme4 moved from Imports to Suggests, since it is needed only for mixed-model input. patchwork was added, for the density panels.
  • The package now has a test suite and a Getting started with int3ract vignette.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.7 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK7 OK2026-05-06
Advisories

none known

Documentation

In release 2.0.0
READMEYes · 440 wordsVignettesYes · 1 · evaluation depends on the environmentNEWSYes · 100% structured · mentions 2.0.0Citation fileYes · software entry only
Help pages
15 (4 internal)includes a package overview page
Examples that run
100%8 run in a plain check
Exported functions with examples
56%
Documented parameters
63%
Return-value docs
89%
Help pages citing references
7%

Downloads

1.3K
CRAN downloads in the past year
Rank #18,488 · ~4/day · ~107/mo
Daily download trend is not available in this view yet.
26630 days
70990 days
1.3K1 year
Compare downloads with other packages →
Also on45 r2u

Repository

0Stars
1Forks
1Open issues
0Open PRs
1Releases
64Commits
2Commit identities
64 commits · Last activity 2026-09-03 · Default branch at 2.1.0, ahead of CRAN 2.0.0 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
124
Median days to close, 50 most recently updated closed PRs
0

Forks over time

2026-07-07 · 02026-10-04 · 1
PracticesBeta

4 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/rwkrause/int3ract on 2026-10-21.

Docs source (1)

GitHub Pages site

CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-04-10
    Named in .Rbuildignore: .claude
    Named in .gitignore: .claude
    Pull request it wrote: opened by a project member
    Commits: at least 4 crediting it in the message
Models named in its commits
  • Claude Opus 54 commits · Sep 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
9 external dependencies (excludes base and recommended)

Installing int3ract adds 33 packages (18 with compiled code, 40 MB of source tarballs). Heaviest: sf 9.3 MB, ggplot2 6.0 MB, ggpattern 3.4 MB.

Depends (1)
R >= 4.4.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 1.0.7 (2026), Copyright holder
Releases (2)

Pick two releases to compare their code metrics.

  • 2.0.0Latest
    record
    2026-09-01 · current release · diff ↗ ·
    added 9 exports
    JN, autoplot, jn_input, jn_plots, jn_posterior, jn_regions, jn_save, jn_style, jn_wald
  • 1.0.7
    record
    2026-05-05
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-05-05
Total releases
2 / 1 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 4.4.0
Download size
135 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("int3ract")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.48550/arxiv.2604.22051.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for int3ract version 2.0.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy