score_emotb: Score Adult EMOTB

View source: R/score_emotb.R

score_emotbR Documentation

Score Adult EMOTB

Description

Computes scores for the NIH Toolbox Emotion Measures, Adult Forms (ages 18-52) (2019).

Usage

score_emotb(
  df,
  scales = "all",
  max_impute = 0.2,
  drop_items = FALSE,
  keep_reverse_codes = FALSE,
  add_alphas = TRUE,
  item_prefix = c("TB_PercStrs_", "TB_Self_", "TB_MP_", "TB_Sad_", "TB_GLS_",
    "TB_PosAf_", "TB_AngAf_", "TB_AngPA_", "TB_AngHost_", "TB_EmoSup_", "TB_FearAf_",
    "TB_FearSoma_", "TB_Friend_", "TB_InstrSup_", "TB_Lone_", "TB_PercHost_",
    "TB_PercRej_", "TB_Apathy_")
)

Arguments

df

The data frame containing the assessment items.

scales

A character vector specifying the scales to include in the scoring. The default is "all", which includes all scales. Other possible values are: "percstrs", "self", "mp", "sad", "gls", "posaf", "angaf", "angpa", "anghost", "emosup", "fearaf", "fearsoma", "friend", "instrsup", "lone", "perchost", "percrej", and "apathy".

max_impute

The threshold for mean imputation. Items with missing values below this threshold will be mean imputed. The default is 0.2.

drop_items

Logical indicating whether to drop the individual item columns from the resulting data frame. The default is FALSE.

keep_reverse_codes

Logical indicating whether to keep the reverse-coded items in the resulting data frame. The default is FALSE.

add_alphas

Logical indicating whether to compute Cronbach's alpha coefficients for the scales and append them to the resulting data frame. The default is TRUE.

item_prefix

A character vector specifying the item prefixes as they appear in the data.frame. The vector must be the same length as the 'scales' parameter and prefixes must be in the same corresponding order. If 'scales' is set to "all", the prefixes must appear in the order of possible values for the 'scales' parameter provided above (Perceived Stress, Self Efficacy, etc.).

Details

The function scores the Adult EMOTB assessment based on the provided data frame. It supports various scoring options, including selecting specific scales, mean imputation of missing values, dropping individual item columns, keeping reverse-coded items, and computing alpha coefficients.

The function adds three columns per scale to the data frame 'df', containing the raw scores (_Raw), the theta scores (_Theta), and the t-scores (_T) for the NIH Toolbox Emotion Measures, respectively.

Note: The scoring is based on the 2019 raw score to t-score conversion tables manual. Note: Some measures were omitted from the manual, in which case older versions were used. Note: The function assumes that pasting 'TB_', the subscale, and the item numbers together yields the items from each of the tests.

See: http://www.healthmeasures.net/images/nihtoolbox/Technical_Manuals/Emotion/NIH_TB_Emotion_Raw_Score_to_T-Score_Conversion_Tables_Manual_3.19.19.pdf

Value

A data frame with the computed scores and optional alpha coefficients.

Author(s)

Michael Hallquist, Melanie Glatz, Zach Vig

Examples

# Score all scales with default options
scores <- score_emotb(data_frame)

# Score specific scales and keep reverse-coded items, while specifying item-level prefixes as they appear in the data
scores <- score_emotb(data_frame, scales = c("self", "angaf"), keep_reverse_codes = TRUE, item_prefix=c("Self_","AngAf_"))


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