Changelog
Source:NEWS.md
rwa 1.0.1
CRAN release: 2026-09-28
Improvements
- Fixed the CRAN macOS ARM test error in the near-collinear fixture of “estimable highly correlated predictors retain their valid fit” (#29). The predictors correlated at
1 - 5e-9, giving a condition number near4e8and a platform-dependent rounding error above the test’s tolerance. They now correlate at about0.99995, which stays highly collinear and estimable with a much smaller rounding error.calculate_rwa()is unchanged, since the deviation was bounded floating-point error rather than a calculation defect. - Applied the same treatment to the neighbouring test “additional predictors do not impose a new conditioning cutoff”, whose
1.1e-7offset gave a condition number near3e14and left only about 7x headroom under the1e-8tolerance. It now uses a1e-4offset. The assertions in both tests were strengthened, not relaxed: the predictor correlation is pinned within(0.9999, 1), the raw relative weights are asserted to sum to the returned R-squared, andrwa()is asserted to agree withrwa_multiregress(). No returned value is clamped or repaired to satisfy an assertion. - The R CMD check workflow now runs on macOS arm64 with R release and old-release alongside the existing Ubuntu R release job, covering the CRAN platform that reported the error.
There are no user-facing changes in this release.
rwa 1.0.0
CRAN release: 2026-09-16
Breaking Changes
-
Raw.Significantis now derived from a comparison against a randomly generated variable’s weight, rather than from the confidence interval around the raw weight itself (#26). Raw relative weights are non-negative, so an interval around a weight almost always excludes zero and previously flagged even unrelated predictors as significant. Comparing each weight to that of a random variable is the approach suggested by Tonidandel, LeBreton and Johnson (2009, https://doi.org/10.1037/a0017735) for judging whether a weight exceeds what chance alone would produce (see also the discussion invignette("evaluating-rwa-method-reference")). This package applies a directional cutoff on that comparison: a predictor is significant only when the lower bound of the difference interval is above zero, so a predictor that performed worse than the random variable is not reported as significant either. Predictors previously reported as significant may now correctly be reported as not significant.rwa()also returnsRandom.Diff.CI.LowerandRandom.Diff.CI.Upperfor the comparison the flag is based on, and the descriptiveRaw.RelWeight.CI.*columns are unchanged. - Because significance requires this comparison,
bootstrap = TRUEnow runs an additional bootstrap whencomprehensive = FALSE, which roughly doubles bootstrap time.comprehensive = TRUEalready computed the comparison and is unaffected.
New Features
- Added
rwa_logit()andrwa_multiregress()to support logistic regression and multiple regression. - Added new vignette to cover the new regression methods.
- Added
useparameter torwa()function to control how missing data is handled when computing correlations. Options include “pairwise.complete.obs” (default, pairwise deletion), “complete.obs” (listwise deletion), and other standard options fromcor(). (#12) - Added
weightparameter torwa()function to perform observation-weighted Relative Weights Analysis (#12), using a weighted complete-case correlation matrix. Bootstrap inference uses iid individual-row resampling, carrying each row’s weight; clusters, strata, and replicate-weight survey designs are not supported. - Weighted results from both
rwa()andrwa_multiregress()now includen_weighted(sum of retained original weights) andn_effective(Kish’s unequal-weighting effective sample size). Existing unweighted return fields are unchanged. - Added a weighted/missing-data vignette explaining filtering, weight scaling, diagnostic counts, and bootstrap limitations.
- Updated the introductory and regression-methods vignettes to cover the
useandweightarguments, the weighted sample-size diagnostics, and the multiple-regression-only scope. Corrected the introductory vignette’s incorrect statement that missing data is handled by listwise deletion; the default has been pairwise deletion.
Improvements
- Updated all bootstrap functions to support the new
useandweightparameters - Shared numeric, finite, strictly positive weight validation across point estimates and bootstrap calculations; missing-weight filtering remains mode-dependent.
- Validate the full joint correlation matrix and predictor invertibility with documented numerical tolerances and actionable errors for missing-data-induced indefinite matrices, constant variables, singularity, and insufficient data (#24). Exact fits remain valid when predictors are not collinear.
- Preserve legacy missing-data preprocessing, including outcome removal before every correlation mode and weighted predictor-completeness filtering even for
all.obs; correctedna.or.completedocumentation. -
plot_rwa()now reports the sum of weights and the effective sample size in the caption for weighted analyses, so weighted charts are distinguishable from unweighted ones. - Weighted results return
n_weightedandn_effectiveimmediately aftern, making them easier to find. Field names and unweighted output are unchanged. - Datasets with fewer usable observations than predictors now name the sample-size problem in the singular-matrix error, instead of reporting only an eigenvalue (relevant to the rank-deficient data discussed in #10). Models that were previously estimable, including pairwise-deletion models with few complete cases, are unaffected.
- Added a plain-English summary of the weighting and missing-data behavior to
?rwa, including guidance on when to use survey weights. - Improved test coverage and minor bug fixes
Bug Fixes
- Fixed weighted single-predictor calculations and random-comparison name collisions, including weight columns named
rand. - Bootstrap samples now preserve predictor identity, order, and statistic length. Invalid or degenerate samples error instead of dropping variables or recycling estimates; no samples are skipped or retried.
- Comprehensive bootstrap now computes random comparisons without a focal predictor and correctly labels and maps random/focal intervals to the requested predictors.
rwa 0.1.1
CRAN release: 2026-01-20
Improvements
-
Input validation: Added comprehensive validation for
rwa()parameters includingconf_level,n_bootstrap, non-numeric variables, zero-variance variables, and singular correlation matrices with informative error messages - Code refactoring: Consolidated duplicate RWA calculation code in bootstrap functions into a single internal helper
- Documentation: Added links to pkgdown site in README; fixed internal function documentation
Bug Fixes
- Fixed flaky bootstrap test by using a fixed random seed for reproducibility (#20)
rwa 0.1.0
CRAN release: 2025-07-16
New Features
-
Bootstrap confidence intervals: Added
bootstrap = TRUEparameter torwa()for statistical significance testing of relative weights -
Result sorting: Added
sort = TRUEparameter to automatically sort results by importance (descending order). Setsort = FALSEto preserve original predictor order - Comprehensive vignette: New detailed documentation covering methodology, examples, and best practices
- Enhanced documentation: Updated README and function documentation
Technical Improvements
-
Package compliance: Updated DESCRIPTION with proper
Authors@Rfield for CRAN submission - CI/CD: Enhanced GitHub Actions workflow with vignette building support
-
Dependencies: Added
boot,purrr, andutilspackages for bootstrap functionality - Code quality improvements: Fixed long lines in R code to meet CRAN standards
- Documentation cleanup: Improved code formatting and removed unused variables
- Enhanced vignette formatting: Cleaned up formatting in comprehensive vignette documentation
Bug Fixes
- Fixed vignette compilation issues
- Resolved R CMD check warnings and notes
- Removed unused variables to eliminate R CMD check notes
- Improved consistency in code formatting
Version 0.0.2
Re-submission to CRAN
- DOI references added to DESCRIPTION
- Added CodeFactor badge
- Typos in DESCRIPTION rectified
Version 0.0.1
First submission to CRAN (required to re-submit)
rwa()plot_rwa()remove_all_na_cols()-
%>%operator is exported