VR12_score: Compute VR12 component subscale

Description Usage Arguments Value See Also Examples

View source: R/VR12.R

Description

Given a tibble with VR12 item scores, add a column for component VR12 scores. If there is any missing data, imputation should be performed prior to this.

Usage

1
VR12_score(.data, .vars, scale, mode = "Phone")

Arguments

.data

tibble

.vars

list of columns (parsed with tidyselect) holding the VR12 item scores, in the following order: GH1, PF2, PF4, VRP2, VRP3, VRE2, VRE3, BP2, MH3, VT2, MH4, SF2. Item scores should be 1-based integers.

scale

either "PCS" (physical component) or "MCS" (mental component)

mode

either "Phone" (default) or "Mail"

Value

tibble with new column, either "PCS" or "MCS"

See Also

Other VR12 utilities: VR12_scale()

Examples

1
2
3
4
5
VR12_score(data.frame(
  GH1 = c(1, 4), PF2 = c(3, 1), PF4 = c(3, 1), RP2 = c(1, 4), RP3 = c(1, 4),
  RE2 = c(1, 4), RE3 = c(1, 4), BP2 = c(1, 5), MH3 = c(1, 5), VT2 = c(1, 5),
  MH4 = c(6, 1), SF2 = c(5, 1)),
  dplyr::everything(), "PCS")

anchorlytics/anchorUtils documentation built on Oct. 16, 2020, 7:11 p.m.