% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EQ_functions.R
\name{toEQ5Dindex}
\alias{toEQ5Dindex}
\title{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{
\item{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).}

\item{dim.names}{Character vector of length 5 giving the dimension names, in
the conventional MO, SC, UA, PD, AD order.}

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

\item{quiet}{Logical. Suppress informational messages about assumed column /
name order. Default \code{FALSE} so existing scripts see the same messages;
set \code{TRUE} inside pipelines.}
}
\value{
An integer vector with one element per row (data.frame/matrix input)
  or a single integer (vector input).  Works inside \code{dplyr::mutate()}
  without \code{rowwise()}.
}
\description{
Convert EQ-5D dimension scores to a five-digit profile index
}
\examples{
# Named vector — scalar usage unchanged
toEQ5Dindex(c(mo=1, sc=2, ua=3, pd=1, ad=2))
}
