1 - 5e-9, giving a condition number near 4e8 and a platform-dependent rounding error above the test's tolerance. They now correlate at about 0.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.1.1e-7 offset gave a condition number near 3e14 and left only about 7x headroom under the 1e-8 tolerance. It now uses a 1e-4 offset. 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, and rwa() is asserted to agree with rwa_multiregress(). No returned value is clamped or repaired to satisfy an assertion.There are no user-facing changes in this release.
Raw.Significant is 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 in vignette("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 returns Random.Diff.CI.Lower and Random.Diff.CI.Upper for the comparison the flag is based on, and the descriptive Raw.RelWeight.CI.* columns are unchanged.bootstrap = TRUE now runs an additional bootstrap when comprehensive = FALSE, which roughly doubles bootstrap time. comprehensive = TRUE already computed the comparison and is unaffected.rwa_logit() and rwa_multiregress() to support logistic regression and multiple regression.use parameter to rwa() 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 from cor(). (#12)weight parameter to rwa() 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.rwa() and rwa_multiregress() now include n_weighted (sum of retained original weights) and n_effective (Kish's unequal-weighting effective sample size). Existing unweighted return fields are unchanged.use and weight arguments, 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.use and weight parametersall.obs; corrected na.or.complete documentation.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.n_weighted and n_effective immediately after n, making them easier to find. Field names and unweighted output are unchanged.?rwa, including guidance on when to use survey weights.rand.rwa() parameters including conf_level, n_bootstrap, non-numeric variables, zero-variance variables, and singular correlation matrices with informative error messagesbootstrap = TRUE parameter to rwa() for statistical significance testing of relative weightssort = TRUE parameter to automatically sort results by importance (descending order). Set sort = FALSE to preserve original predictor orderAuthors@R field for CRAN submissionboot, purrr, and utils packages for bootstrap functionalityRe-submission to CRAN
\donttest{} in examples where unnecessaryRe-submission to CRAN
First submission to CRAN (required to re-submit)
rwa()plot_rwa()remove_all_na_cols()%>% operator is exported