Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
8e9fbe8
Add perm_ses_test
arcaldwell49 Jan 30, 2026
c639906
Update Claude settings
arcaldwell49 Jan 30, 2026
7f39c18
Added smd_calc htest support
arcaldwell49 Jan 30, 2026
0c29f37
Update vignette
arcaldwell49 Jan 30, 2026
9c11861
Fix issue with Hodges-Lehmann
arcaldwell49 Jan 30, 2026
188bf6a
Fix hodges_lehmann docs
arcaldwell49 Jan 30, 2026
4479799
Added score method
arcaldwell49 Feb 4, 2026
e50ebae
update perm_ses_test
arcaldwell49 Feb 5, 2026
0a7eb91
Delete test_debug.R
arcaldwell49 Feb 6, 2026
c209d65
Add "auto" for se_method
arcaldwell49 Feb 6, 2026
a7fd605
Update boot_ses_calc.R
arcaldwell49 Feb 6, 2026
9a6d592
Add BCa bootstrap
arcaldwell49 Feb 6, 2026
00da234
Bug in bootsrap SMD/SES calc
arcaldwell49 Feb 6, 2026
7aed44e
Add tests for simple_htest
arcaldwell49 Feb 12, 2026
f0c56d8
Update robustTOST.Rmd
arcaldwell49 Feb 13, 2026
d4b7a92
Updated tests
arcaldwell49 Feb 13, 2026
488d892
Add trimming for bootstrapping
arcaldwell49 Feb 14, 2026
b629f89
Added denom argument
arcaldwell49 Feb 16, 2026
fb253c1
Update NEWS.md
arcaldwell49 Feb 16, 2026
749f8e3
Update estimate outputs
arcaldwell49 Feb 16, 2026
df05bbb
Add trimming for SMD
arcaldwell49 Feb 17, 2026
04c4e4f
knitted vignette
arcaldwell49 Feb 17, 2026
60622a2
Add htest vignette
arcaldwell49 Feb 17, 2026
4dd53f9
Small edits
arcaldwell49 Feb 17, 2026
029009a
Fixed brunner munzel paired issues
arcaldwell49 Feb 18, 2026
d5a2287
update documentation
arcaldwell49 Feb 18, 2026
929dbda
Fix degenerate BM test cases
arcaldwell49 Feb 18, 2026
a25ce1a
Small change to SMD vignette
arcaldwell49 Feb 18, 2026
e5ed162
Add new labels for BM/SES
arcaldwell49 Feb 18, 2026
1cabe59
Update labeling
arcaldwell49 Feb 18, 2026
07f0a15
Fix to Agresti ses_calc
arcaldwell49 Feb 19, 2026
fbb8e7f
Added score method for SES calc
arcaldwell49 Feb 19, 2026
10b1a6a
update notation for Brunner-Munzel
arcaldwell49 Feb 19, 2026
031638f
Fixed labels
arcaldwell49 Feb 19, 2026
3589ab5
Added note for ses_calc agresti
arcaldwell49 Feb 19, 2026
f2a9f6e
Add new labeling system
arcaldwell49 Feb 19, 2026
223d670
fix errors
arcaldwell49 Feb 19, 2026
2c95797
Add Kornbot rank difference
arcaldwell49 Feb 19, 2026
ac660f8
minor change to labels
arcaldwell49 Feb 19, 2026
d6a18d9
small change to documentation
arcaldwell49 Feb 19, 2026
f3976af
Update SMD calc notation
arcaldwell49 Feb 19, 2026
6bd977a
Update correlation method
arcaldwell49 Feb 20, 2026
fc31a87
Update NEWS.md
arcaldwell49 Feb 20, 2026
8acacb1
Merge branch '112-update-ses' of https://github.com/Lakens/TOSTER int…
arcaldwell49 Feb 20, 2026
4fe7f53
Added p-value method for bootstrap correlations
arcaldwell49 Feb 21, 2026
d11c42a
Fix error in example
arcaldwell49 Feb 21, 2026
c60b15f
Update cohend_calcs.R
arcaldwell49 Feb 21, 2026
1f74d8d
Update label
arcaldwell49 Feb 23, 2026
1826f93
Fixing bootstrap error
arcaldwell49 Feb 23, 2026
1958b66
Update for boot p-value match CI
arcaldwell49 Feb 23, 2026
fd53706
Update hypothesis_testing.Rmd
arcaldwell49 Feb 23, 2026
148b076
Update hypothesis_testing.Rmd
arcaldwell49 Feb 23, 2026
ea2e587
Fixed label errors
arcaldwell49 Feb 24, 2026
59531ba
Merge branch '112-update-ses' of https://github.com/Lakens/TOSTER int…
arcaldwell49 Feb 24, 2026
0e8d8d8
fixed hodges_lehmann permutation.
arcaldwell49 Feb 25, 2026
aadb856
Started boot_ses_test
arcaldwell49 Feb 25, 2026
dd92ca4
Added parametric bootstrap for ses
arcaldwell49 Feb 26, 2026
85e0116
Updated vignettes and documentation
arcaldwell49 Mar 13, 2026
b70e312
fixes to errors
arcaldwell49 Mar 16, 2026
23c6892
small fixes
arcaldwell49 Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ NUL
^codecov\.yml$
^CLAUDE\.md$
^references$
^\.claude$
Comment thread
arcaldwell49 marked this conversation as resolved.
134 changes: 134 additions & 0 deletions .claude/settings.local.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
NOT_CRAN: true

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
NOT_CRAN: true

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ NUL
cran-comments.md
Rplots.pdf
references/working/
.claude/
20 changes: 20 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Implements the two one-sided tests (TOST) procedure to test equivalence for t-te

Primary citation: Lakens (2017) <doi:10.1177/1948550617697177>

## Workflow

**Always work directly in the local repository** — edit files in place, run tests, and commit from the main checkout. Do NOT create git worktrees or separate working directories. This keeps the workflow simple and changes immediately visible in the user's IDE/editor.

**Non-production files**: If separate R scripts, markdown files, or other working files are needed during development but are not intended for the package itself (e.g., scratch analyses, exploratory scripts, notes), place them in the `junk/` folder. This keeps the package source tree clean.

## Development Commands

```r
Expand All @@ -19,6 +25,20 @@ devtools::document() # Generate documentation from roxygen2

## Code Style

### R Script Section Headings
Place the section title after a `#` (or `##` for sub-sections) followed by at least four trailing dashes (`-`), equal signs (`=`), or hashtags (`#`). Do NOT place lines of `#` signs before and after section headings.

```r
# Good
# Load data --------
## Clean variables ----

# Bad
######################
# Load data
######################
```

### Naming Conventions
- **Main functions**: `snake_case` (e.g., `t_TOST`, `boot_t_TOST`, `brunner_munzel`, `wilcox_TOST`)
- **Legacy functions**: `camelCase` or mixed (e.g., `TOSTone`, `TOSTpaired`, `powerTOSTtwo`)
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ LazyData: true
Config/testthat/edition: 3
Depends:
R (>= 3.5)
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Language: en-US
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ S3method(boot_log_TOST,default)
S3method(boot_log_TOST,formula)
S3method(boot_ses_calc,default)
S3method(boot_ses_calc,formula)
S3method(boot_ses_test,default)
S3method(boot_ses_test,formula)
S3method(boot_smd_calc,default)
S3method(boot_smd_calc,formula)
S3method(boot_t_TOST,default)
Expand Down Expand Up @@ -48,6 +50,7 @@ export(boot_compare_smd)
export(boot_cor_test)
export(boot_log_TOST)
export(boot_ses_calc)
export(boot_ses_test)
export(boot_smd_calc)
export(boot_t_TOST)
export(boot_t_test)
Expand Down Expand Up @@ -86,11 +89,13 @@ export(power_eq_f)
export(power_t_TOST)
export(power_twoprop)
export(power_z_cor)
export(rank_diff)
export(rbs)
export(ses_calc)
export(simple_htest)
export(smd_calc)
export(t_TOST)
export(trans_rank_prob)
export(tsum_TOST)
export(twoprop_test)
export(wilcox_TOST)
Expand All @@ -110,6 +115,7 @@ importFrom(lifecycle,deprecated)
importFrom(stats,complete.cases)
importFrom(stats,cor)
importFrom(stats,density)
importFrom(stats,dlogis)
importFrom(stats,dnorm)
importFrom(stats,dt)
importFrom(stats,integrate)
Expand Down
72 changes: 72 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,37 @@ NEWS

## New Features

- New `trans_rank_prob()` function for transforming probability-scale effect sizes
between four scales: probability (concordance), difference (rank-biserial),
log-odds, and odds. Supports bidirectional transformation via `from` and `to`
arguments with delta-method standard errors and monotonic CI endpoint mapping.

- `brunner_munzel()` gains a `scale` argument to report results on alternative
scales ("probability", "difference", "logodds", "odds") without changing the
underlying test. The default `scale = "probability"` preserves existing behavior.

- `ses_calc()` estimate labels now use probability notation (e.g.,
`P(X>Y) - P(X<Y)` instead of `Rank-Biserial Correlation`). The `$method`
string and data frame row names retain human-readable names. Code that parses
`names(result$estimate)` may need updating.

- `ses_calc()` paired sample labels use `P(Z>0)` notation (where Z = X - Y);
one-sample labels use `P(X>0)`.


- Effect size calculators now support hypothesis testing and `htest` output:
- `ses_calc` and `boot_ses_calc` updated with `output`, `alternative`, and `null.value` arguments
- Default output is now `"htest"` class; use `output = "data.frame"` for legacy format
- Supports `"two.sided"`, `"less"`, `"greater"`, `"equivalence"`, and `"minimal.effect"` alternatives
- New Agresti/Lehmann placement-based SE method (`se_method = "agresti"`) with log-odds scale hypothesis testing
- Continuity correction for boundary cases (complete separation)
- `smd_calc` and `boot_smd_calc` updated with `output`, `alternative`, `null.value`, and `test_method` arguments
- Default output is now `"htest"` class; use `output = "data.frame"` for legacy format
- Supports the same alternative hypothesis options as `ses_calc`
- `test_method` argument (`"z"` or `"t"`) controls the reference distribution for `smd_calc`
- Degrees of freedom included in output when `test_method = "t"`
- Bootstrap p-values for `boot_smd_calc` computed from empirical distribution
- New `denom` argument for direct denominator selection (`"z"`, `"rm"`, `"pooled"`, `"avg"`, `"glass1"`, `"glass2"`), overriding `glass`, `rm_correction`, and `var.equal` as needed; informative messages on conflicts
- Added `hodges_lehmann` function for robust location testing
- Implements Hodges-Lehmann estimators (HL1 for one-sample/paired, HL2 for two-sample)
- Supports exact permutation, randomization, and asymptotic (KDE-based) inference
Expand All @@ -19,8 +50,49 @@ NEWS
- Handles null values (single or equivalence bounds) as reference lines
- Automatically handles two-sample t-test estimates by computing mean difference

- Added BCa (bias-corrected and accelerated) bootstrap confidence intervals as a new `boot_ci = "bca"` option for:
- `boot_t_test`, `boot_t_TOST`, `boot_log_TOST`, `boot_smd_calc`, `boot_ses_calc`, and `boot_cor_test`
- BCa intervals provide second-order accuracy by correcting for bias and skewness in the bootstrap distribution
- Acceleration factor computed via leave-one-out jackknife (pooled jackknife for two-sample designs)
- Informative errors for degenerate cases with suggestion to use `boot_ci = "perc"` as fallback

## Improvements

- **Correlation SE improvements** for `z_cor_test()` and `corsum_test()`:
- Spearman's rho now uses the Bonett-Wright ρ-dependent SE formula
(`sqrt((1 + r^2/2) / (n - 3))`) instead of the fixed 1.06 constant,
providing better calibration across the full range of rho.
- `z_cor_test()` gains a `se_method` argument (`"analytic"` or `"jackknife"`)
for computing the standard error via leave-one-out resampling on the
Fisher z scale. The jackknife SE is used consistently for both the test
statistic and the confidence interval.
- Both functions now return `stderr` as a named vector with `z.se`
(Fisher z scale, used for inference) and `cor.se` (delta method SE on the
correlation scale, for descriptive purposes).
- The `method` string in the returned `htest` object now indicates the SE
type used (e.g., `"Pearson's product-moment correlation with approximate SE"`
or `"Spearman's rank correlation rho with jackknifed SE"`).

- `simple_htest()`, `boot_t_test()`, `perm_t_test()`, and `hodges_lehmann()`
now produce more informative estimate labels that indicate the direction of
calculation (e.g., `"mean difference (treatment - control)"` when using the
formula interface).
- For two-sample mean-based tests (`simple_htest` with t-test, `boot_t_test`,
`perm_t_test`), the mean difference is now appended as a third element of
`$estimate`, while preserving existing group means at positions 1-2
(backwards-compatible).
- Paired test estimates are labeled to clarify the differencing operation,
e.g., `"mean of the differences (z = x - y)"`.
- Wilcoxon/Mann-Whitney estimates in `simple_htest()` are labeled as
`"Hodges-Lehmann estimate"` with direction indicated.
- `hodges_lehmann()` estimate labels updated for clarity: `"pseudomedian of x"`
for one-sample, `"Hodges-Lehmann estimate (x - y)"` for two-sample, and
`"Hodges-Lehmann estimate (z = x - y)"` for paired tests.
- Trimmed mean labels in `boot_t_test()` and `perm_t_test()` now include the
trimming proportion, e.g., `"trimmed mean difference (x - y, tr = 0.1)"`.
- A `$sample_size` element (named numeric vector) is now included in the
returned `htest` object for all four functions. For two-sample formula calls,
names reflect the actual factor levels.
- **Permutation test terminology**: Clarified distinction between "Exact Permutation" (all permutations enumerated) and "Randomization" (permutations sampled with replacement) tests across `perm_t_test`, `hodges_lehmann`, and `brunner_munzel`
- **p_method auto-selection**: Added intelligent default for `p_method` argument in permutation-based functions:
- `NULL` (default): Automatically selects "exact" for exact permutation tests and "plusone" for randomization tests
Expand Down
Loading
Loading