| rolescry_default_name_bonus | R Documentation |
Returns a ready-made, ASCII-English keyword dictionary suitable for the
name_bonus argument of detect_roles(). It externalizes the
hard-coded keyword lists that lived inside the original MDStatR engine
(group/treatment, outcome, survival-time and event, subject-id terms) into a
plain, inspectable, locale-neutral list.
rolescry_default_name_bonus(domain = c("clinical", "finance", "all"))
domain |
Keyword domain: |
Passing this turns column names into a small, capped tie-breaker only
(\le 10 percent of the selection score); the mathematical signature
still dominates (>= 90 percent), satisfying the name-blindness contract.
Detection without it (name_bonus = NULL) is purely mathematical.
A named list of character vectors (regex fragments), with keys
group_var, outcome_continuous, outcome_binary,
subject_id, time_variable, event_variable.
nb <- rolescry_default_name_bonus()
names(nb)
set.seed(1)
d <- data.frame(
treatment_arm = rep(c("A", "B"), each = 60),
biomarker = rnorm(120),
death = rbinom(120, 1, 0.3)
)
detect_roles(d, name_bonus = nb)$roles$group_var$columns
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.