Tiny hotfix for a single test-suite regex.
Following acceptance of the companion paper, the package metadata was updated for public release. No R code, exported function signatures, or computational behavior changed; the version number is held at 0.2.2 to match the version cited in the companion paper’s Data Availability statement.
DESCRIPTION: Authors@R now identifies the
real author (previously an anonymized placeholder used for masked peer
review); added a URL field pointing to the OSF project;
updated the companion-paper citation from “submitted” to “in
press”.LICENSE: copyright holder now named explicitly.README.md: removed the masked-review notice; updated
installation instructions to reference CRAN; corrected the citation and
version status.man/*.Rd: regenerated via
roxygen2::roxygenise(). These were inadvertently omitted
from the tarball used for masked review.test-bootstrap-strata.R: the
expect_warning() pattern was "stratum"
(singular), but the package’s actual warning message uses
"strata" (plural):
"One or more source x group strata has fewer than 4 observations...".
The pattern did not match, so the warning propagated through
expect_warning as an unmatched warning and the test failed
with “Expected … to throw a warning.” The pattern is now
"strata".No code or API changes. Expected result on R 4.5.3:
R CMD check: 0 errors | 0 warnings | 1 note (Windows time check; harmless)
testthat: FAIL 0 | PASS 79
Post-build hotfix release. Addresses issues uncovered by the first
full R CMD check --as-cran and
testthat::test_package() run on Windows R 4.5.3. No public
API changes; all changes are test-data, namespace, and roxygen-doc
corrections.
Added tests/testthat/helper-data.R with
make_factor_data(), a helper that generates two-group test
data with a shared latent factor so that estimated alpha is positive and
well-conditioned. The first cut of the 0.2.0 test suite used independent
rnorm() items, which produced alpha near zero (often
negative). The new validation check in v0.2.0 correctly rejected those,
so eleven tests failed because the test data were not psychometrically
realistic. All tests now use make_factor_data() and the
factor-structured items yield alpha in a realistic range (0.8 — 0.95
depending on the noise level).
Fixed regex escaping in test-validation.R: the
literal-paren patterns (0, 1\\] were misparsed as an
unclosed regex group. They now match by a content keyword
("must lie") that is unambiguous.
Tightened the bootstrap-stratum warning test in
test-bootstrap-strata.R with an explicit
regexp = "stratum" pattern, so it matches the package’s own
warning even when boot::boot emits incidental
warnings.
Fixed
test-compute_ltg_smd.R::"LTG-SMD agrees with observed geometric SMD when reliability = 1"
to drop the names attribute before expect_equal, which
otherwise rejects the comparison on name mismatch.
multisite_ltg_smd() now uses
stats::aggregate() explicitly instead of bare
aggregate(), removing the “no visible global function”
NOTE.
print.multisite_ltg_smd() now uses
utils::head() explicitly instead of bare
head(), removing the second “no visible global function”
NOTE.
denominator_diagnostics() roxygen text now wraps
inline math in \eqn{...} rather than passing bare
(rho_1 rho_0)^{1/4} notation through to Rd. This removes
the “Lost braces” NOTE.
The R CMD check pass on Windows R 4.5.3 confirms:
getting-started.Rmd builds cleanly via
knitr + rmarkdown..Rd documentation files are generated by
devtools::document().remotes::install_local().\examples blocks pass.R CMD check.After v0.2.1, the expected outcome is 0 errors | 0 warnings | 0 notes (or at most the universal “New submission” note) on R CMD check, and FAIL 0 | PASS 47 on the test suite.
This is a pre-submission revision addressing pre-submission code review feedback. All API-breaking changes are noted explicitly.
compute_ltg_smd()’s
reliability_estimator argument is now actually used.
Previously the argument was documented to accept either “alpha” or a
user-supplied function but was ignored at runtime; the package always
used coef_alpha(). This is now a real plug-in interface:
passing
reliability_estimator = function(items) psych::omega(items)$omega.tot,
or any other function returning a numeric scalar in (0, 1], works as
documented.
ltg_smd_ci()’s bootstrap now stratifies on the
four-cell cross of source (study vs reference) and the experimental
group variable, not only on source. The previous design preserved
overall study and reference sample sizes but allowed the focal/reference
group ratio within each source to vary across replicates, producing
unstable confidence intervals when group sizes were small or unequal.
The new stratification preserves all four study x group cell sizes
exactly, which is the correct design for two-group SMD
bootstrap.
multisite_ltg_smd() now correctly builds the
composite score for the external reference data frame when
score_var = NULL and
reference_strategy = "external". Previously the composite
was built only for the experimental data, causing the
function to fail when an external reference was supplied without a
precomputed composite.
Reliability estimates and rho_external values are
now validated to lie in (0, 1]. Previously a negative coefficient alpha
(which can occur with strongly anticorrelated items) silently produced
NaN results from the LTG-SMD formula; now the function stops with an
informative error.
compute_ltg_smd() now checks for zero or non-finite
group variances and reports an informative error.
compute_ltg_smd() gains a se_method
argument with values "fourth_moment" (new default; uses the
sample fourth-moment plug-in consistent with Section 6 of the companion
paper) and "normal" (the prior 2*sigma^4/(m-1)
approximation, retained for explicit normal- theory
comparisons).
multisite_ltg_smd() adds an
se_ltg_method element to its return value documenting that
site-level LTG-SMD standard errors treat the cross-site (or external)
reference denominator as fixed. The print method displays this
note.
All public functions now validate rho_external early
via a shared helper, with named-component and range checks.
Removed the URL and BugReports fields,
which previously contained bracketed placeholder strings unsuitable for
R CMD check. These will be reintroduced after acceptance with real
repository URLs.
Version bumped to 0.2.0 and Description updated to reflect the pluggable reliability estimator and the new bootstrap stratification.
The test suite is substantially expanded:
tests/testthat/test-manual-calculations.R:
hand-computed LTG-SMD, Hedges’s g, external observed, reliability
factor, and study-to- target factor on tiny deterministic
datasets.
tests/testthat/test-validation.R:
custom-reliability-estimator propagation, unknown estimator string
error, rho_external range and naming checks, negative-alpha
detection, zero-variance detection, missing-item-column error, missing
group_var / score_var errors.
tests/testthat/test-bootstrap-strata.R: confirms
that bootstrap records
strata_design = "source x group_var", recovers the four
cell sample sizes exactly, and emits a warning when any stratum has
fewer than 4 observations.
tests/testthat/test-multisite-and-supplementary.R:
external- reference path with score_var = NULL,
se_ltg_method exposure,
sensitivity_reference() direction-of-change behavior under
narrower vs. wider references, export_supplementary() list
structure and Markdown writing.
helpers.R adds check_reliability(),
check_rho_external(),
resolve_reliability_estimator(), and
var_s2_plugin() (fourth- moment based variance of
s^2).
group_summary() now also records mu4
(fourth central moment) per group, enabling the
"fourth_moment" analytic SE.
All public functions emit informative error messages instead of silently producing NaN or unexpected NULL output.
Initial pre-submission build.
compute_ltg_smd(),
ltg_smd_ci(), denominator_diagnostics(),
denominator_sensitivity(),
sensitivity_reference(), multisite_ltg_smd(),
coef_alpha(), export_supplementary().getting-started.Rmd.