score_bpq: Score the Borderline Personality Questionnaire (BPQ)

View source: R/score_bpq.R

score_bpqR Documentation

Score the Borderline Personality Questionnaire (BPQ)

Description

Score the Borderline Personality Questionnaire (BPQ)

Usage

score_bpq(
  df,
  item_prefix = "BPQ_",
  max_impute = 0.2,
  drop_items = FALSE,
  keep_reverse_codes = FALSE,
  input_codes = c(0, 1),
  false_value = 0,
  true_value = 1,
  bad_items = NULL,
  add_alphas = TRUE
)

Arguments

df

a data.frame containing the 80 BPQ items to be scored

item_prefix

a character prefix of the items names in df to be scored. Default: "BPQ"

max_impute

the proportion of missingness [0..1) or number [1..n] of missing values per scale. Below this threshold, the person subscale mean will be imputed for missing items.

drop_items

whether to remove the item-level data from the df. Default: FALSE

keep_reverse_codes

whether to retain the reverse coded items (suffix "r")

input_codes

the original T/F coding scheme of the input data.frame in the form c(False Code, True Code). These are converted to the specified false and true values.

false_value

the 'False' value for the item anchors, used in score validation. Default: 0

true_value

the 'True' value for the item anchors, used in score validation. Default: 1

bad_items

numeric value or vector of the items that need to be dropped before imputation or calculation of subscales

add_alphas

whether to compute coefficient alpha for subscales and return a column attribute. Default: TRUE

Details

Adds ten columns, BPQ_impulsivity, BPQ_instability, BPQ_abandonment, BPQ_relationships, BPQ_selfimage, BPQ_suicide, BPQ_emptiness, BPQ_anger, BPQ_psychotic, and BPQ_total, to df containing the different subscales, respectively.

Note: the default BPQ scoring uses the mean of the items for the scales.

Note: the code assumes that pasting together the item_prefix and the numbers 1:80 will yield the 80 items from the test.

Author(s)

Michael Hallquist, Zach Vig


PennStateDEPENdLab/dependlab documentation built on Sept. 13, 2024, 4:48 a.m.