score_fs: Score the Flourishing Scale (Diener, Wirtz, Tov, Kim-Prieto,...

View source: R/score_fs.R

score_fsR Documentation

Score the Flourishing Scale (Diener, Wirtz, Tov, Kim-Prieto, Choi, Oishi, & Biswas-Diener, 2009)

Description

Score the Flourishing Scale (Diener, Wirtz, Tov, Kim-Prieto, Choi, Oishi, & Biswas-Diener, 2009)

Usage

score_fs(
  df,
  item_prefix = "FS_",
  max_impute = 0.2,
  drop_items = FALSE,
  min_value = 1,
  max_value = 7,
  bad_items = NULL,
  add_alphas = TRUE
)

Arguments

df

a data.frame containing the 8 FS items to be scored

item_prefix

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

max_impute

the proportion of missingness [0..1) or number [1..n] of missing values per scale. Default: 0.2 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. Default: 1

max_value

the highest value for the item anchors. Default: 7

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 one column, FS_total, to df containing the FS scale items.

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

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

See: http://labs.psychology.illinois.edu/~ediener/FS.html

Author(s)

Michael Hallquist, Zach Vig


PennStateDEPENdLab/dependlab documentation built on Sept. 26, 2024, 8:40 p.m.