dr_from_design: Map study design labels to illustrative design-robustness...

View source: R/score.R

dr_from_designR Documentation

Map study design labels to illustrative design-robustness scores

Description

Provides a convenience mapping from design-type labels to numeric scores.

Usage

dr_from_design(
  design,
  custom_map = NULL,
  default_score = 0.25,
  warn_unknown = TRUE
)

Arguments

design

Character vector of design labels (case-insensitive).

custom_map

Optional named numeric vector overriding or extending the defaults.

default_score

Score assigned to unrecognised labels. Default 0.25.

warn_unknown

If TRUE, warn about unrecognised labels.

Details

This mapping is a demonstration default, not a validated measurement model and not a universal hierarchy of study quality. A design label does not determine the magnitude or direction of bias in a particular evidence base. For substantive work the index should be constructed for the specific synthesis, outcome, and identification problem at hand, ordinarily with dr_score, and reported under alternative defensible codings.

Value

A numeric vector of scores in [0, 1], the same length as design.

See Also

dr_score

Examples

dr_from_design(c("RCT", "DiD", "OLS", "IV", "matching"))
dr_from_design("house_method", custom_map = c(house_method = 0.65))

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