Barratt Impulsiveness Scale (key-driven)
Arguments
- data
Data frame containing questionnaire item columns.
- col_map
Named list mapping canonical item IDs to column names; defaults assume items are already named.
- key
List with
items,min_val,max_val, optionalreverseandsubscales.- na_action
How to handle rows with missing items:
keep,omit, orerror.- missing_prop_max
Maximum allowed proportion of missing items per row before the score is set to
NA.- impute
Imputation strategy for missing items when under the threshold:
noneormean(row-wise mean).- prefix
Prefix for output column names.
- verbose
Logical; if
TRUE, emits informational messages about column resolution and scoring progress viahm_inform().
Value
A tibble of score columns only (total and optional subscales). Input columns are not included.
References
Patton JH, Stanford MS, Barratt ES (1995). “Factor Structure of the Barratt Impulsiveness Scale.” Journal of Clinical Psychology, 51(6), 768–774. doi:10.1002/1097-4679(199511)51:6<768::AID-JCLP2270510607>3.0.CO;2-1 .
Examples
bis_key <- list(items = sprintf("bis_%02d", 1:5), min_val = 1, max_val = 4)
df <- data.frame(bis_01 = 1, bis_02 = 2, bis_03 = 3, bis_04 = 4, bis_05 = 2)
bis_score(df, key = bis_key)
#> # A tibble: 1 × 1
#> BIS_total
#> <dbl>
#> 1 12