dr_score: Build a design-robustness index from sub-scores

View source: R/score.R

dr_scoreR Documentation

Build a design-robustness index from sub-scores

Description

Combines user-supplied sub-score dimensions into a single index in [0, 1] as a normalised weighted average. The components, their coding rules, and their weights should be prespecified and reported.

Usage

dr_score(..., weights = NULL, warn_range = TRUE)

Arguments

...

Named numeric vectors of equal length, each a sub-score in [0, 1].

weights

Optional relative weights, one per sub-score. Defaults to equal weighting.

warn_range

If TRUE, warn when any value falls outside [0, 1] before clipping.

Details

For confirmatory use, none of the sub-scores may be a function of the realized effect estimate, its standard error, its p-value, its confidence interval, or any outcome-dependent diagnostic. A score that uses such information defines an exploratory analysis, not a primary scale moderator. This function cannot verify that condition; it is the analyst's responsibility.

Value

A numeric vector in [0, 1], carrying an attribute "subscores" that holds the clipped inputs and the resulting index.

Examples

dr_score(balance = c(0.9, 0.6, 0.4),
         overlap = c(0.8, 0.7, 0.5),
         weights = c(2, 1))

drmeta documentation built on Aug. 25, 2026, 1:08 a.m.