score_pid5: Score the Personality Inventory for DSM-5 Faceted Brief Form...

View source: R/score_pid5.R

score_pid5R Documentation

Score the Personality Inventory for DSM-5 Faceted Brief Form – 100 items PID-5-BF (Maples et al., 2013)

Description

Score the Personality Inventory for DSM-5 Faceted Brief Form – 100 items PID-5-BF (Maples et al., 2013)

Usage

score_pid5(
  df,
  item_prefix = "PID_",
  max_impute = 0.2,
  drop_items = FALSE,
  min_value = 0,
  max_value = 3,
  bad_items = NULL,
  add_alphas = TRUE
)

Arguments

df

a data.frame containing the 100 PID-5-BF items to be scored

item_prefix

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

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

min_value

the minimum value for the item anchors, used in reverse scoring. Default: 0

max_value

the highest value for the item anchors, used in reverse scoring. Default: 3

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 the total scale and return a column attribute. Default: TRUE

Details

Adds thirty columns to df containing the different trait facet and trait domain subscales, respectively.

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

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

Author(s)

Michael Hallquist, Zach Vig


PennStateDEPENdLab/dependlab documentation built on April 10, 2024, 5:15 p.m.