alphaN 0.3.0
New features
New function
alphaN_power()computes the power of the calibrated test against a standardized effect of sized: the design-time companion ofalphaN()(noncentral t for single coefficients, noncentral F for joint tests, at the residual degrees of freedom). For model-specific effect parameterizations (odds ratios, rate ratios), the calibrated alpha plugs directly into the calculators of the pwrss package via theiralphaargument; see?alphaN_power.New function
alphaN_power_plot()draws power against sample size, one panel per effect size, with every calibration method evaluated at its own alpha(n) and a fixed reference level as a dashed curve.alphaN_report()gains apower_atargument: the settings report can now document the power of the calibrated test against the effect sizes the researcher cares about, alongside the alpha itself.alphaN_report()now also states the scope of the"ES"and"moment"calibrations: exact for the normal linear model whenpis supplied (evaluated at the effective sample sizen - p), the conservative large-sample form otherwise, and asymptotic for other generalized linear models.New function
alphaN_report()writes a preregistration-ready Markdown settings report: every input behind a calibrated alpha (sample size, evidence target, method, prior settings), the resulting alpha, the decision rule, and the references to cite. It mirrors the downloadable report of the companion Shiny application, can write straight to a file, and hard-wraps its lines (default 72 characters, seewidth) so the report reads well in consoles, files, and rendered documents.JAB()called without acovariatenow returns a named vector with the Bayes factor of every coefficient except the intercept (which remains available on explicit request).alphaN_plot()andJAB_plot()have been restyled: colorblind-safe Okabe-Ito palette, light grid lines, open axes, and horizontal axis labels.alphaN_plot()additionally gains alogargument (“x”, “y”, “xy”) which helps when the fast-falling “moment” curve is drawn next to the others, and its tick labels always use plain notation (“0.0001” and “10,000”, never “1e-04”).New function
klauerBF()exports the effect-size and moment Bayes factors of Klauer, Meyer-Grant & Kellen (2025) thatalphaN()inverts: from a t statistic (one-sample test or single regression coefficient) or from an F statistic for a joint test ofqcoefficients.alphaN()(methods"ES"and"moment") gains argumentsqandp. Withq > 1the alpha level is calibrated for the joint F test of q coefficients through the exact regression-case Bayes factors of Klauer et al. (2025, Table 4), implemented natively including their Gaussian hypergeometric term;psets the number of retained model parameters so that small-sample calibrations can use the effective sample sizen - p(residual degrees of freedom). The defaults (q = 1,p = 0) reproduce the previous behavior exactly. The moment-prior defaultnuis now5 + (q - 1)and the ES-prior scale recommendation generalizes tor = sqrt((nu - 2)/(nu * q)) * de, both following the paper (unchanged atq = 1).New function
n_effective()computes the effective sample sizen * (se/se_robust)^2that Wulff & Taylor (2024) recommend as a sensitivity check when calibrating alpha with clustered (panel) data.alphaN_plot()gains amethodsargument and can now draw the"ES"and"moment"curves alongside the prior-fraction methods.The regression-case implementation is validated against all printed Bayes factors in Table 8 of Klauer et al. (2025), in addition to the existing Table 7 anchors, and the q = 1 F form agrees with the validated t form to near machine precision.
The quadrature and inversion machinery is additionally stress-tested against an independent oracle that integrates on the original effect scale over an infinite range with a plain density ratio (none of the package’s substitution, windowing, or log-clamping choices); the normal-limit switch at
n - p= 50,000 is measured directly by running both branches at the same effective sample size, and monotonicity of alpha innandBF, and of the Bayes factors in the test statistic, is checked over grids that cross the switch, including joint tests and small residual degrees of freedom.
Documentation
- Klauer, Meyer-Grant & Kellen is now cited with its printed-issue details (2025, Psychonomic Bulletin & Review, 32, 1070-1094) throughout; it was previously cited by its online-first year, 2024.
-
?alphaNstates the model scope of the"ES"and"moment"methods: exact under the normal linear model, asymptotic (like the prior-fraction methods) for other generalized linear models. -
citation("alphaN")now also lists Klauer et al. (2025) for users of the"ES"and"moment"methods.
alphaN 0.2.0
CRAN release: 2026-07-12
New features
-
alphaN()gains two methods based on Klauer, Meyer-Grant & Kellen (2024, Psychonomic Bulletin & Review, doi:10.3758/s13423-024-02612-2):method = "ES"calibrates alpha to their effect-size Bayes factor, whose prior centers the alternative hypothesis on a prespecified effect size, andmethod = "moment"calibrates alpha to their moment Bayes factor, under which effects near zero are a priori implausible. New argumentsde(targeted effect size, default 0.5),nu, andrcontrol the priors, with defaults following the paper’s recommendations. Because the moment prior rules out near-zero effects, the alpha level it implies falls much faster withnthan under JAB. - As a special case,
method = "ES", nu = 1, de = 0with an explicitrcalibrates alpha to the default (Jeffreys-Zellner-Siow type) Bayes factor of Rouder et al. (2009). - The implementation is validated against all twelve Bayes factors printed in Table 7 of Klauer et al. (2024); these checks are part of the test suite.
alphaN 0.1.3
Improvements
- All functions now validate their inputs and fail with informative error messages: a mistyped
method, a missingdfinJABp(..., z = FALSE), apoutside (0, 1], a non-positivenorBF, and an unknowncovariateinJAB()(which now lists the coefficients available in the model). -
JAB_plot()gained anupperargument, passed on to the underlying computations formethod = "balanced". -
alphaN_plot()gained aylimargument. The default now covers all four curves; previously the y-axis was fixed to (0, 0.05), which silently clipped the"balanced"curve for small Bayes factors. -
JAB()now determines the sample size vianobs().
Documentation
-
?JABpno longer has a placeholder title. - Corrected the Wagenmakers (2022) reference (year, title) and updated the Wulff & Taylor reference to the published version (2024, Strategic Organization, doi:10.1177/14761270231214429) in the documentation, README, and vignette.
- Added a CITATION file for the companion paper.
- Fixed typos in the vignette and documented that
JABp()expects a two-sided p-value.
