toEQ5Dindex: Convert EQ-5D dimension scores to a five-digit profile index

View source: R/EQ_functions.R

toEQ5DindexR Documentation

Convert EQ-5D dimension scores to a five-digit profile index

Description

Convert EQ-5D dimension scores to a five-digit profile index

Usage

toEQ5Dindex(
  x,
  dim.names = c("mo", "sc", "ua", "pd", "ad"),
  na.rm = FALSE,
  quiet = FALSE
)

Arguments

x

A data.frame, matrix, or named numeric vector of EQ-5D dimension scores. Each dimension must contain integer values (typically 1–3 or 1–5).

dim.names

Character vector of length 5 giving the dimension names, in the conventional MO, SC, UA, PD, AD order.

na.rm

Logical. If FALSE (default), any NA in a row produces NA in the output. If TRUE, NA dimensions are treated as 0 — use with care, as this silently changes the index value.

quiet

Logical. Suppress informational messages about assumed column / name order. Default FALSE so existing scripts see the same messages; set TRUE inside pipelines.

Value

An integer vector with one element per row (data.frame/matrix input) or a single integer (vector input). Works inside dplyr::mutate() without rowwise().

Examples

# Named vector — scalar usage unchanged
toEQ5Dindex(c(mo=1, sc=2, ua=3, pd=1, ad=2))

eq5dsuite documentation built on April 11, 2026, 5:06 p.m.