respondeR 0.2.0
Results differ from 0.1.0
Several methodological corrections change published numbers. Rerun analyses made with version 0.1.0. se_method = "binomial", rd_weights = "inverse_variance" reproduces the 0.1.0 individual point estimate.
- Exact tail probabilities. Responder probabilities are evaluated on the log scale in the requested tail, and risk ratios and odds ratios come from exact log probabilities. In 0.1.0 a study whose responder probabilities fell below 1e-10 was clamped to a log ratio of 0 with a near-zero variance and, with the delta SE, captured the pooled risk ratio and odds ratio (pooled RR 1.000 while the other studies showed 3.7), without a warning.
-
Risk-difference weights. Fixed-effect risk differences are pooled with sample-size (Mantel-Haenszel) weights by default (
rd_weights). With inverse-variance weights one study whose probabilities sit near 0 or 1 could dominate at ordinary thresholds: onvas_painat a MID of -1, one study held 63 percent of the weight and the pooled RD was 0.03 instead of about 0.14. A warning now reports any study holding more than half of the weight. -
MID uncertainty.
mid_sdis one threshold shared by every study, so its uncertainty is added once after pooling, through the derivative of the pooled estimator. It was added to each study before pooling, which shrank it with the number of studies and moved random-effects estimates. -
Weighted method. Pools the control mean and the within-study mean difference instead of each arm separately, keeping the randomized comparison. Separate arm pooling can show a Simpson’s-paradox bias when allocation ratios differ across studies. It follows
poolingandci_method, and its variance is the full delta method over every arm mean and SD (including the SD-dependent weights, the pooled SDs and the chosen distribution’s moments), plus the between-study variance of the pooled means under random effects (and the HKSJ scaling when requested). -
SMD method. Keeps the chosen random-effects interval (
ci_methodwas ignored), propagates the uncertainty of the estimated control risk with its correlation with the pooled SMD (on the logit scale, so the joint covariance stays valid), transforms its prediction interval to the risk-difference scale, and is labeled as the logistic bridge (Hasselblad and Hedges; Chinn), not Cox. -
Defaults.
se_methodnow defaults to"delta", which carries the uncertainty of the reported mean and SD. -
Intervals.
ci_method = "hksj_adhoc"adds the Hartung-Knapp-Sidik-Jonkman interval with the ad hoc floor of Rover, Knapp and Friede (2015); plain HKSJ can be far narrower than Wald when studies agree closely. Prediction intervals uset_{k-2}and the variance that built the interval for both DL and REML (REML previously used metafor’s own rule), andvar_rdreports that variance. -
Non-Normal models. Sampling variances under
dist = "t"and"lognormal"use the distribution’s own third and fourth moments. These first-order intervals tend to run wide in finite samples; withdf<= 4 the t model has no finite fourth moment and the intervals are much too narrow, with a warning. -
Multi-arm trials. An optional
trialcolumn marks comparisons that share a control arm; its sample size is divided among them so control patients are not counted twice.vas_paingains this column for its two three-arm trials.
New features
-
responder_analysis()returns aresponder_result: still a data frame, withprint()(a formatted table with Altman NNTB/NNTH),summary()(settings, heterogeneity and per-study weights),plot()(forest plot) andas.data.frame()methods. -
responder_curve(): the analysis across a grid of MID thresholds, with the largest study weight at each and aplot()method. -
responder_sof(): GRADE summary-of-findings rows per 1000 patients at one or more assumed control risks, from the pooled odds ratio (default), risk ratio or risk difference. -
impute_change_sd()andestimate_change_cor(): Cochrane Handbook reconstructions of change-score SDs from baseline and final SDs, confidence intervals, standard errors, t statistics or p-values. -
responder_analysis()is generic and accepts a fitted continuous meta-analysis saved in an R object:- a
metaobject of themetacontfamily: the per-arm summaries are read, excluded studies are dropped, and the fit’s pooling choices (common or random effects, DL or REML, Hartung-Knapp with or without the ad hoc rule, and the confidence level) carry over unless overridden; when the fit lists several random-effects interval methods, the Hartung-Knapp one is used; settings that cannot be reproduced are reported; - a
metaforrmaobject: the pooled standardized mean difference or mean difference is converted, given a namedbaselinecontrol responder risk (andsd_reffor a mean-difference model), keeping the fit’s interval method and confidence level. The object is read with base R, so the package that produced it need not be attached.
- a
-
responder_from_effect(): converts a single pooled relative effect plus a baseline control risk to responder measures, orienting the effect bydirection, propagating an estimated baseline jointly with the effect, and working on the log, logit and Normal-quantile scales so far-tail baselines and large effects keep their precision. -
as_responder_data(): extract the arm-summary data frame from a supported meta-analysis object. -
responder_rd_individual()gainsci_type = "logit"(MOVER intervals). -
format_responder_results()adds anNNTcolumn in the Altman form.
Bug fixes and validation
- Factor columns are read by their labels, not their integer codes.
- Infinite SDs or sample sizes, blank study labels and invalid
df(vector, infinite, missing) are rejected with clear messages; duplicate study labels warn. - Misspelled or unknown arguments are an error instead of being silently ignored.
- Tiny tail probabilities keep full precision (
direction = "lower"no longer computes1 - p), and extreme thresholds no longer crash with either SE method. - A shared control arm too small to split among its comparisons is an error.
- The Shiny app keeps results in step with their settings, clears results when new data are loaded, labels intervals with the level actually used, and lists warnings and messages from the analysis.
- Corrected page numbers for Anzures-Cabrera et al. (2011): 2967 to 2985.
Notes
- Network meta-analysis (
netmeta) and multilevel network meta-regression (multinma) objects are not yet supported. - The browser app at https://choxos.github.io/respondeR/app/ is a separate implementation and does not yet include these changes.
respondeR 0.1.0
CRAN release: 2026-06-19
First public release. The package began life as a small Shiny app; this release rebuilds it as a documented, tested R package with the statistics in pure, exported functions and the Shiny app as a thin front end.
Robustness and methodology hardening
In response to an external methodology audit:
- Boundary handling. Extreme MIDs that push a responder probability to exactly 0 or 1 no longer crash or return infinite intervals; probabilities are clamped away from 0 and 1 only where they feed logs, logits and weights, while the reported proportions and risk difference stay unclamped.
-
Small-study random effects. Added
ci_method = "hksj"for the Hartung-Knapp-Sidik-Jonkman interval, better calibrated than Wald when the number of studies is small. - Weighted-method variance now propagates uncertainty in the pooled SD as well as the pooled mean (full delta method), so its intervals are no longer too narrow. Weighted confidence intervals are slightly wider than in the first build; the point estimates are unchanged.
-
Stricter validation. Sample sizes must be whole numbers; the lognormal model now rejects negative study-arm mean changes before aggregation; and the vector building blocks reject non-finite
sd/n. - The
binomialSE is documented as a pseudo-binomial approximation, withdeltarecommended for summary-statistic inputs.
Features
-
responder_analysis(): the main entry point. Converts continuous arm summaries (mean change, SD, n) into responder proportions and a tidy table of between-arm effect measures: risk difference, risk ratio, odds ratio and number needed to treat. Pooling methods:"individual","weighted","unweighted","median"and"smd". -
responder_rd_individual()andresponder_proportions(): exported building blocks for per-study risk differences and arm responder probabilities. -
responder_cles(): threshold-free common-language effect size (the probabilistic index), pooled fixed or random effects, requiring no MID. -
format_responder_results(): display-ready formatting for reports and the app. -
launch_responder_analysis(): launches the bundled ResponderAnalysis Shiny application (direction toggle, method/pooling/interval options, RR/OR/NNT, a per-study forest plot, CLES and CSV I/O). -
sample_responder_data: small bundled example dataset. -
vas_pain: a real bundled dataset of 20 exercise-for-spinal-health trials pooled on the VAS pain scale (Li et al., 2025, doi:10.3389/fspor.2025.1614906, reproduced under CC BY 4.0).
Methods and options
-
Random effects. The individual and SMD methods support fixed- or random-effects pooling (
pooling = "random") with DerSimonian-Laird (dependency-free) or REML (tau_method = "REML", via metafor) between-study variance, reporting Cochran’s Q, I-squared, tau-squared and a prediction interval. - Relative measures. Risk ratio and odds ratio (log-scale pooling) and number needed to treat (Altman, 1998) accompany the absolute risk difference.
-
SMD bridge. The
"smd"method pools the standardized mean difference (Hedges’ g) and maps it to an odds ratio through the logistic link, combined with the weighted-pooled control risk (Cox; Chinn, 2000). -
Refinements. Logit-transformed proportion intervals and Newcombe MOVER risk-difference intervals (
ci_type = "logit"); propagation of uncertainty in the MID threshold (mid_sd); alternative change-score distributions (dist = "lognormal"or"t"). -
Baseline-risk option.
control = "median"takes the control responder proportion from the median control arm for every summary method (the Sofi-Mahmudi 2024 simulation baseline), while still pooling the experimental arm by the chosen method; the defaultcontrol = "matched"pools the control arm the same way as the experimental arm. Because the median control arm has no sampling-variance model,control = "median"returns point estimates only.
Statistical corrections (results differ from the previous app)
The earlier Shiny app contained several errors that are fixed here. Numbers from the weighted and unweighted methods, and all confidence intervals, will differ from that app; the individual and median point estimates are unchanged.
- The control responder proportion is, by default, computed with the same pooling as the experimental arm (previously every method reused the median method’s control proportion). The earlier median-baseline behavior remains available as an explicit, documented choice via
control = "median". - The weighted method now pools the SD with the within-study pooled SD
sqrt(sum((n-1) sd^2) / sum(n-1))rather than inverse-variance pooling of SDs, with a delta-method variance for the risk difference. - The median and unweighted methods are reported as point-estimate summaries (no variance model) instead of carrying a spurious interval.
- Proportions are kept on the
[0, 1]scale internally, removing a class of percent-scale variance errors.
Removed
- The unused and incorrect Mantel-Haenszel helpers
rr_meta(),rd_meta()andprop_meta()(which operated on a 2x2 count format the package never produced;rr_meta()returned swapped confidence limits) have been removed, along with the duplicated, unvalidatediv_meta().
Infrastructure
- Full roxygen2 documentation with runnable examples and references.
- A testthat suite (104 checks) covering known-answer results, regression anchors, edge cases and every method.
- A pkgdown website, methodology and getting-started vignettes, and a hex logo.
- A startup message on
library(respondeR)noting the installed version, theresponder_analysis()entry point and the project links.