get_health_states_from_dimensions: Get five digit health states from dimension scores

View source: R/helpers.R

get_health_states_from_dimensionsR Documentation

Get five digit health states from dimension scores

Description

Merge MO, SC, UA, PD and AD dimension scores to get five digit health states.

Usage

get_health_states_from_dimensions(
  scores,
  version = "5L",
  ignore.invalid = TRUE,
  dimensions = .get_dimension_names()
)

Arguments

scores

a data.fram containing each dimension in a column

version

3L, 5L or Y. Used for validating scores when ignore.invalid is FALSE.

ignore.invalid

whether to ignore invalid scores. TRUE returns NA, FALSE throws an error.

dimensions

character vector specifying "dimensions" column names. Defaults are "MO", "SC", "UA", "PD" and "AD".

Value

A character vector of individual dimension scores.

Examples

scores <- data.frame(MO=c(1,1,1,1,1),SC=c(1,2,1,2,1),
                     UA=c(1,2,3,2,1),PD=c(3,2,1,2,3),AD=c(3,3,3,3,3))
get_health_states_from_dimensions(scores, version="5L")


eq5d documentation built on Sept. 11, 2024, 7:34 p.m.