Skip to contents

Dichotomizes each study at the MID threshold and returns the per-study responder risk difference (experimental minus control) with a confidence interval. Building block for the "individual" method of responder_analysis(); also feeds the forest plot and per-study table.

Usage

responder_rd_individual(
  data,
  mid,
  direction = c("higher", "lower"),
  se_method = c("delta", "binomial"),
  conf_level = 0.95,
  dist = c("normal", "lognormal", "t"),
  df = NULL,
  mid_sd = 0,
  ci_type = c("wald", "logit")
)

Arguments

data

A data frame in the responder format with one row per study (columns study, change_e, sd_e, n_e, change_c, sd_c, n_c, and optionally trial); see sample_responder_data.

mid

Single finite number: the minimal important difference threshold.

direction

"higher" (a larger change indicates response) or "lower".

se_method

Per-study variance model for "individual": "delta" (default) propagates the sampling uncertainty of the reported mean and SD through the change-score model; "binomial" uses the pseudo-binomial p (1 - p) / n, which treats the model-based probability as an observed proportion (the version 0.1.0 default).

conf_level

Confidence level (default 0.95).

dist

Change-score distribution: "normal" (default), "lognormal" or "t". Sampling variances use the distribution's own third and fourth moments.

df

Degrees of freedom when dist = "t" (a single number greater than 2).

mid_sd

Optional standard deviation of the MID threshold; when > 0 its uncertainty is added to the effect-measure variances (once, after pooling).

ci_type

"wald" (default) or "logit". With "logit" the weighted method builds its risk-difference interval by the MOVER method from logit-scale arm intervals (allowing for their correlation), so it stays within [-1, 1]. It applies to the weighted method and to responder_rd_individual(); pooled individual and smd intervals are formed on the scale that is pooled. A nonzero mid_sd forces Wald intervals, with a warning.

Value

A data frame with one row per study and columns study, p_e, p_c, rd, se, ci_lb, ci_ub (proportion scale).

Details

With ci_type = "logit" each interval is built by Newcombe's MOVER method from logit-scale arm intervals and stays within [-1, 1]; a nonzero mid_sd adds the threshold uncertainty (which correlates the two arms) on the Wald scale instead.

Examples

responder_rd_individual(sample_responder_data, mid = 1)
#>     study       p_e       p_c        rd         se      ci_lb     ci_ub
#> 1 Study 1 0.4867232 0.2564577 0.2302655 0.08067806 0.07213941 0.3883916
#> 2 Study 2 0.4355507 0.2259278 0.2096229 0.04394149 0.12349918 0.2957466
#> 3 Study 3 0.5068639 0.2047187 0.3021452 0.04108392 0.22162219 0.3826682