Type: Package
Title: Methods for Analysing 'EQ-5D' Data and Calculating 'EQ-5D' Index Scores
Version: 0.16.0
Description: EQ-5D is a popular health related quality of life instrument used in the clinical and economic evaluation of health care. Developed by the EuroQol group https://euroqol.org/, the instrument consists of two components: health state description and evaluation. For the description component a subject self-rates their health in terms of five dimensions; mobility, self-care, usual activities, pain/discomfort, and anxiety/depression using either a three-level (EQ-5D-3L, https://euroqol.org/information-and-support/euroqol-instruments/eq-5d-3l/) or a five-level (EQ-5D-5L, https://euroqol.org/information-and-support/euroqol-instruments/eq-5d-5l/) scale. Frequently the scores on these five dimensions are converted to a single utility index using country specific value sets, which can be used in the clinical and economic evaluation of health care as well as in population health surveys. The eq5d package provides methods to calculate index scores from a subject's dimension scores. 32 TTO and 11 VAS EQ-5D-3L value sets including those for countries in Szende et al (2007) <doi:10.1007/1-4020-5511-0> and Szende et al (2014) <doi:10.1007/978-94-007-7596-1>, 47 EQ-5D-5L EQ-VT value sets, the EQ-5D-5L crosswalk value sets developed by van Hout et al. (2012) <doi:10.1016/j.jval.2012.02.008>, the crosswalk value sets for Bermuda, Jordan and Russia and the van Hout (2021) reverse crosswalk value sets. 10 EQ-5D-Y value sets are also included as are the NICE 'DSU' age-sex based EQ-5D-3L to EQ-5D-5L and EQ-5D-5L to EQ-5D-3L mappings. Methods are also included for the analysis of EQ-5D profiles, including those from the book "Methods for Analyzing and Reporting EQ-5D data" by Devlin et al. (2020) <doi:10.1007/978-3-030-47622-9>. Additionally a shiny web tool is included to enable the calculation, visualisation and automated statistical analysis of EQ-5D data via a web browser using EQ-5D dimension scores stored in CSV or Excel files.
License: MIT + file LICENSE
Encoding: UTF-8
Depends: R (≥ 3.5.0), lifecycle, rlang
Suggests: testthat, shiny, DT, mime, readxl, ggplot2, ggiraph, ggiraphExtra, shinycssloaders, shinyWidgets, FSA, PMCMRplus, knitr, rmarkdown, covr
URL: https://github.com/fragla/eq5d
BugReports: https://github.com/fragla/eq5d/issues
RoxygenNote: 7.3.2
VignetteBuilder: knitr
Language: en-GB
NeedsCompilation: no
Packaged: 2025-06-19 22:21:57 UTC; fm78w
Author: Fraser Morton [aut, cre], Jagtar Singh Nijjar [aut]
Maintainer: Fraser Morton <fraser.morton@glasgow.ac.uk>
Repository: CRAN
Date/Publication: 2025-06-19 22:40:02 UTC

eq5d: Methods for Analysing 'EQ-5D' Data and Calculating 'EQ-5D' Index Scores

Description

EQ-5D is a popular health related quality of life instrument used in the clinical and economic evaluation of health care. Developed by the EuroQol group https://euroqol.org/, the instrument consists of two components: health state description and evaluation. For the description component a subject self-rates their health in terms of five dimensions; mobility, self-care, usual activities, pain/discomfort, and anxiety/depression using either a three-level (EQ-5D-3L, https://euroqol.org/information-and-support/euroqol-instruments/eq-5d-3l/) or a five-level (EQ-5D-5L, https://euroqol.org/information-and-support/euroqol-instruments/eq-5d-5l/) scale. Frequently the scores on these five dimensions are converted to a single utility index using country specific value sets, which can be used in the clinical and economic evaluation of health care as well as in population health surveys. The eq5d package provides methods to calculate index scores from a subject's dimension scores. 32 TTO and 11 VAS EQ-5D-3L value sets including those for countries in Szende et al (2007) doi:10.1007/1-4020-5511-0 and Szende et al (2014) doi:10.1007/978-94-007-7596-1, 47 EQ-5D-5L EQ-VT value sets, the EQ-5D-5L crosswalk value sets developed by van Hout et al. (2012) doi:10.1016/j.jval.2012.02.008, the crosswalk value sets for Bermuda, Jordan and Russia and the van Hout (2021) reverse crosswalk value sets. 10 EQ-5D-Y value sets are also included as are the NICE 'DSU' age-sex based EQ-5D-3L to EQ-5D-5L and EQ-5D-5L to EQ-5D-3L mappings. Methods are also included for the analysis of EQ-5D profiles, including those from the book "Methods for Analyzing and Reporting EQ-5D data" by Devlin et al. (2020) doi:10.1007/978-3-030-47622-9. Additionally a shiny web tool is included to enable the calculation, visualisation and automated statistical analysis of EQ-5D data via a web browser using EQ-5D dimension scores stored in CSV or Excel files.

Author(s)

Maintainer: Fraser Morton fraser.morton@glasgow.ac.uk

Authors:

See Also

Useful links:


EQ-5D-5L Crosswalk data

Description

Crosswalk index value calculation table to calculate EQ-5D-3L indices from EQ-5D-5L data for Denmark, France, Germany, Japan, Netherlands, Russia, Spain, Thailand, UK, USA and Zimbabwe.

Usage

CW

Format

An object of class data.frame with 3125 rows and 13 columns.

Source

van Hout B, Janssen MF, et al. Interim scoring for the EQ-5D-5L: Mapping the EQ-5D-5L to EQ-5D-3L value sets. Value in Health 2012 Jul-Aug;15(5):708-15. doi:10.1016/j.jval.2012.02.008. PMID: 22867780.

Bailey H, Roudijk B, Brathwaite R. The EQ-5D-3L valuation study for Bermuda: using an on-line EQ-VT protocol. Eur J Health Econ. 2024 Jul 9. doi:10.1007/s10198-024-01701-2. Epub ahead of print. PMID: 38982011.

Al Rabayah A, Roudijk B, Purba FD, Rencz F, Jaddoua S, Siebert U. Valuation of the EQ-5D-3L in Jordan. Eur J Health Econ. 2024 Sep 3. doi:10.1007/s10198-024-01712-z. Epub ahead of print. PMID: 39225720.

Omelyanovskiy V, Musina N, Ratushnyak S, Bezdenezhnykh T, Fediaeva V, Roudijk B, Purba FD. Valuation of the EQ-5D-3L in Russia. Qual Life Res. 2021 Mar 13. doi:10.1007/s11136-021-02804-6. Epub ahead of print. PMID: 33713323.

EQ-5D-5L Crosswalk Index Value Sets


DSU mapping from EQ-5D-3L to EQ-5D-5L

Description

Data for age and sex based mapping from EQ-5D-3L dimensions or utility index score to EQ-5D-5L for China, Germany, Japan, Netherlands, South Korea, Spain and UK.

Usage

DSU3L

Format

An object of class data.frame with 2430 rows and 22 columns.

Source

Hernández Alava M, Pudney S, Wailoo A. Estimating the Relationship Between EQ-5D-5L and EQ-5D-3L: Results from a UK Population Study. Pharmacoeconomics. 2023 Feb;41(2):199-207. doi:10.1007/s40273-022-01218-7. Epub 2022 Nov 30. PMID: 36449173.

Hernández-Alava M, Pudney S. Econometric modelling of multiple self-reports of health states: The switch from EQ-5D-3L to EQ-5D-5L in evaluating drug therapies for rheumatoid arthritis. J Health Econ. 2017 Sep;55:139-152. doi:10.1016/j.jhealeco.2017.06.013. Epub 2017 Jul 4. PMID: 28778350.

NICE DSU mapping website.


DSU mapping from EQ-5D-5L to EQ-5D-3L

Description

Data for age and sex based mapping from EQ-5D-5L dimensions or utility index score to EQ-5D-3L for China, Germany, Japan, Netherlands, South Korea, Spain and UK.

Usage

DSU5L

Format

An object of class data.frame with 31250 rows and 22 columns.

Source

Hernández Alava M, Pudney S, Wailoo A. Estimating the Relationship Between EQ-5D-5L and EQ-5D-3L: Results from a UK Population Study. Pharmacoeconomics. 2023 Feb;41(2):199-207. doi:10.1007/s40273-022-01218-7. Epub 2022 Nov 30. PMID: 36449173.

Hernández-Alava M, Pudney S. Econometric modelling of multiple self-reports of health states: The switch from EQ-5D-3L to EQ-5D-5L in evaluating drug therapies for rheumatoid arthritis. J Health Econ. 2017 Sep;55:139-152. doi:10.1016/j.jhealeco.2017.06.013. Epub 2017 Jul 4. PMID: 28778350.

NICE DSU mapping website.


EQ-5D-3L Reverse Crosswalk data (deprecated)

Description

Reverse Crosswalk index value table to calculate EQ-5D-5L indices from EQ-5D-3L data for England, Germany, Netherlands and USA. Table uses the values published on the EuroQol analysis tools webpage based on reverse engineering of van Hout et al (2012)

Usage

RCW

Format

An object of class data.frame with 243 rows and 4 columns.

Source

Reverse crosswalk datasets


EQ-5D-3L Reverse Crosswalk data

Description

Reverse Crosswalk index value table to calculate EQ-5D-5L indices from EQ-5D-3L data using the van Hout et al (2021) method.

Usage

RCWVH

Format

An object of class matrix (inherits from array) with 243 rows and 47 columns.

Source

doi:10.1016/j.jval.2021.03.009


EQ-5D-3L TTO value set data

Description

Coefficients for the estimation of the EQ-5D-3L index values based on TTO valuation studies for Argentina, Australia, Brazil, Canada, Chile, China, Denmark, Ecuador, France, Germany, Hungary, Italy, Japan, Netherlands, Pakistan, Poland, Portugal, Russia, Singapore, SouthKorea, Spain, SriLanka, Sweden, Taiwan, Thailand, Trinidad and Tobago, Tunisia, UK, USA and Zimbabwe.

Usage

TTO

Format

An object of class data.frame with 63 rows and 32 columns.

Source

Szende, A., Oppe, M., & de Charro, F. (2007), Comparative review of Time Trade-Off value sets. In Szende, A., Oppe, M., & Devlin, N. (Ed.), EQ-5D Value Sets: Inventory, Comparative Review and User Guide (pp. 27-28). Dordrecht, The Netherlands: Springer.

Janssen, B., Szende, A., & Ramos-Goñi JM. (2014), Data and Methods. Szende, A., Janssen, B., & Cabasés, J. (Ed.), In Self-Reported Population Health: An International Perspective based on EQ-5D (p 13). Dordrecht, The Netherlands: Springer.


EQ-5D-3L VAS value set data

Description

Coefficients for the estimation of the EQ-5D-3L index values based on VAS valuation studies for Belgium, Denmark, Europe, Finland, Germany, Iran, Malaysia, New Zealand, Slovenia, Spain and UK.

Usage

VAS

Format

An object of class data.frame with 21 rows and 11 columns.

Source

Oppe, M., Szende, A., & de Charro, F. (2007), Comparative review of Visual Analogue Scale value sets. In Szende, A., Oppe, M., & Devlin, N. (Ed.), EQ-5D Value Sets: Inventory, Comparative Review and User Guide (pp. 37-38). Dordrecht, The Netherlands: Springer.


EQ-5D-5L VT value set data

Description

EQ-5D-5L VT value set calculation data for Australia, Belgium, Canada, China, Denmark, Egypt, England, Ethiopia, France, Germany, Ghana, HongKong, Hungary, India, Indonesia, Iran, Ireland, Italy, Japan, Malaysia, Mexico, Morocco, Netherlands, NewZealand, Norway, Peru, Philippines, Poland, Portugal, Romania, SaudiArabia, Slovenia, SouthKorea, Spain, Sweden, Taiwan, Thailand, Uganda, UAE, Uruguay, USA, Vietnam and Western Preference Pattern (WePP).

Usage

VT

Format

An object of class data.frame with 35 rows and 47 columns.

Source


EQ-5D-Y-3L value set data

Description

EQ-5D-Y-3L value set calculation data for Belgium, Brazil, China, Germany, Hungary, Indonesia, Japan, Netherlands, Slovenia and Spain.

Usage

Y3L

Format

An object of class data.frame with 14 rows and 10 columns.

Source


Calculate EQ-5D index scores

Description

Wrapper for eq5d3l, eq5d5l and eq5dy3l. Calculate EQ-5D index scores for EQ-5D-3L, EQ-5D-5L and EQ-5D-Y-3L. Available value sets can be viewed using the function valuesets.

Usage

eq5d(scores, version, type, country, ignore.invalid, ...)

Arguments

scores

numeric or data.frame with names/colnames MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Alternatively EQ-5D scores can be provided in five digit format e.g. 12321. If five digit scores are used in a data.frame the default column name look for by the function is "State".

version

string of value "3L", "5L" or "Y3L" to indicate instrument version.

type

string specifying method type used in deriving value set scores. Options are TTO or VAS for EQ-5D-3L, VT for EQ-5D-5L, CW for EQ-5D-5L crosswalk conversion valuesets, RCW for EQ-5D-3L reverse crosswalk conversion valuesets and DSU for the NICE Decision Support Unit's EEPRU age-sex based EQ-5D-3L to EQ-5D-5L and EQ-5D-5L to EQ-5D-3L mappings.

country

string of value set country name used.

ignore.invalid

logical to indicate whether to ignore dimension data with invalid, incomplete or missing data.

...

character vectors for column names when using a data.frame. Use "dimensions" (default c("MO", "SC", "UA", "PD" and "AD")), "five.digit" (default "State") or "utility", "age", "sex" and "bwidth" (defaults "Utility", "Age", "Sex" and "bwidth") for NICE DSU mapping. bwidth can also be a number which is applied to the whole dataset. When a single NICE DSU score is being calculated "age", "sex" and "bwidth" are also used. See eq5dmap for valid options. "digits" can also be used to return scores with more precision.

Value

a numeric vector of utility index scores.

Examples


#EQ-5D-5L single utility score by dimension
eq5d(scores=c(MO=1,SC=2,UA=3,PD=4,AD=5), type="VT",
 country="Indonesia", version="5L")
 
#EQ-5D-3L single utility score by dimension
eq5d(scores=c(MO=3,SC=2,UA=3,PD=2,AD=3),
 type="TTO", version="3L", country="Germany")

#Mapping an EQ-5D-5L utility score to EQ-5D-3L using NICE DSU method
eq5d(0.922, country="UK", version="5L", type="DSU",
 age=18, sex="male")

#Calculation of multiple EQ-5D-5L utility scores from a data.frame of dimensions
scores.df <- data.frame(
  MO=c(1,2,3,4,5), SC=c(1,5,4,3,2),
  UA=c(1,5,2,3,1), PD=c(1,3,4,3,4), AD=c(1,2,NA,2,1)
)

eq5d(scores.df, country="Canada", version="5L", type="VT", ignore.invalid=TRUE)

#Calculation of a utility score using five digit state
eq5d(scores=12321, type="TTO", version="3L", country="UK")

scores.df2 <- data.frame(
  state=c(11111,12121,23232,33333)
)

#Calculation of utility scores using a data.frame with five digit states
eq5d(scores=scores.df2, type="TTO", version="3L", country="UK", five.digit="state")

#Calculation of utility scores from a vector of five digit states
eq5d(scores=scores.df2$state, type="TTO", version="3L", country="UK")

#Mapping multiple utility scores from EQ-5D-5L to EQ-5D-3L using NICE DSU method
scores.df3 <- data.frame(
  Utility=c(0.715,0.435,0.95),
  Age=c(50,30,70),
  Sex=c("m","f","m"),
  bwidth=c(0.2,0.2,0.1)
)

#using bwidth column values (one per observation)
eq5d(scores.df3, type="DSU", version="5L", country="UK")

#using single bwidth value for whole dataset
eq5d(scores.df3, type="DSU", version="5L", country="UK", bwidth=0.1) 


Calculate EQ-5D-3L index scores

Description

Calculate indices for EQ-5D-3L value sets. Available value sets can be viewed using the function valuesets.

Usage

eq5d3l(scores, type = "TTO", country = "UK", digits = 3)

Arguments

scores

numeric with names MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression.

type

3L values set type. Either TTO or VAS.

country

value set country.

digits

number of decimal places to return.

Value

calculated utility index score.

Examples

eq5d3l(scores=c(MO=1,SC=2,UA=3,PD=1,AD=3), type="VAS", country="UK")
eq5d3l(scores=c(MO=3,SC=2,UA=3,PD=2,AD=3), type="TTO", country="Germany")


Calculate EQ-5D-5L index scores

Description

Calculate indices for EQ-5D-5L value sets. Available value sets can be viewed using the function valuesets.

Usage

eq5d5l(scores, country = "England", digits = 3)

Arguments

scores

numeric with names MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression.

country

value set country.

digits

number of decimal places to return.

Value

calculated utility index score.

Examples

eq5d5l(scores=c(MO=1,SC=2,UA=3,PD=4,AD=5), country="England")
eq5d5l(scores=c(MO=3,SC=2,UA=5,PD=2,AD=3), country="Netherlands")


Calculate the cumulative frequency profile of an EQ-5D dataset

Description

Calculate the frequency, percentage, cumulative frequency and cumulative percentage for each profile in an EQ-5D dataset.

Usage

eq5dcf(data, version, ignore.invalid, proportions, digits, ...)

Arguments

data

A data.frame with columns MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression or a "State" column containing five digit scores. Alternatively a vector of five digit scores can also be used.

version

string of value "3L" or "5L" to indicate instrument version.

ignore.invalid

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

proportions

boolean whether to include proportion data columns Proportions and CumulativeProp. Default is FALSE.

digits

numeric specifying the number of decimal places for percentages. Defaults to 1.

...

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

Value

a data.frame or list of data.frames of counts/percentages. Columns contain dimensions names and rows the EQ-5D score.

Examples

dat <- read.csv(system.file("extdata", "eq5d3l_example.csv", package="eq5d"))
eq5dcf(dat, "3L")


Calculate EQ-5D-5L crosswalk index scores

Description

Calculate indices for EQ-5D-5L indices by mapping them onto EQ-5D-3L value sets. Available value sets can be viewed using the function valuesets.

Usage

eq5dcw(scores, country = "UK")

Arguments

scores

numeric with names MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression.

country

value set country.

Value

calculated utility index score.

Examples

eq5dcw(scores=c(MO=1,SC=2,UA=5,PD=1,AD=3), country="UK")
eq5dcw(scores=c(MO=3,SC=5,UA=5,PD=2,AD=3), country="Germany")


Analyse the descriptive system of an EQ-5D dataset

Description

Analyses the descriptive components of an EQ-5D dataset producing summary information either as counts or as percentages.

Usage

eq5dds(data, version, counts = FALSE, by = NULL, ignore.invalid = TRUE, ...)

Arguments

data

numeric or data.frame with names/colnames MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Alternatively an EQ-5D score can be provided in five digit format e.g. 12321.

version

string of value "3L" or "5L" to indicate instrument version.

counts

logical show absolute counts in the summary table. Default is FALSE, which shows percentages for each EQ-5D dimension.

by

character specifying the column in the data.frame by which to group the results.

ignore.invalid

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

...

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

Value

a data.frame or list of data.frames of counts/percentages. Columns contain dimensions names and rows the EQ-5D score.

Examples

dat <- data.frame(
         matrix(
           sample(1:3,5*12, replace=TRUE),12,5, 
           dimnames=list(1:12,c("MO","SC","UA","PD","AD"))
         ),
         Sex=rep(c("Male", "Female"))
       )

eq5dds(dat, version="3L")
eq5dds(dat, version="3L", counts=TRUE)

eq5dds(dat, version="3L", by="Sex")


Calculate utility index scores by mapping between EQ-5D-3L and EQ-5D-5L

Description

Conditional prediction of the utility values of 5L scores onto 3L value sets and 3L scores onto 5L value sets from observed or specified values conditional on age and gender using the NICE Decision Support Unit's EEPRU funded models (see NICE DSU's website for more information).

Usage

eq5dmap(scores, country, version, age, sex, bwidth = 0, digits = 3)

Arguments

scores

numeric with names MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. or a utility index score

country

value set country

version

string of value "3L" or "5L" to indicate starting instrument version.

age

age in years (18-100), or age category (1: 18-34, 2: 35-44, 3: 45-54, 4: 55-64, 5: 65-100)

sex

Male or Female

bwidth

bandwith score for approximate scores (< 0.8: 0.2, 0.8-0.951: 0.1, 0.951-1: small, but large enough to include 1)

digits

number of decimal places to return

Details

Available value sets can be viewed using the function valuesets.

Value

calculated utility index score.

Examples

eq5dmap(c(MO=1,SC=2,UA=3,PD=4,AD=5), "UK", "5L", 30, "female")
eq5dmap(0.922, "UK", "5L", 18, "male")
eq5dmap(0.715, "UK", "5L", 50, "male", bwidth = 0.0001)
eq5dmap(0.715, "UK", "5L", 50, "male", bwidth = 0.0001, digits = 8)


Calculate EQ-5D-3L reverse crosswalk index scores

Description

Calculate indices for EQ-5D-3L indices by mapping them onto EQ-5D-5L value sets. Available value sets can be viewed using the function valuesets.

Usage

eq5drcw(scores, country = "UK", method = "VH", digits = 3)

Arguments

scores

numeric with names MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression.

country

value set country.

method

crosswalk values to use. Either "VH" (Van Hout, 2021) or "EQ" (EuroQol 2019 values). The van Hout method is recommended.

digits

number of decimal places to return.

Value

calculated utility index score.

Examples

eq5drcw(scores=c(MO=1,SC=2,UA=3,PD=2,AD=1), country="Netherlands")
eq5drcw(scores=c(MO=3,SC=3,UA=3,PD=3,AD=3), country="Germany")


Calculate EQ-5D-Y index scores

Description

'r lifecycle::badge("deprecated")

'eq5dy' was renamed to 'eq5dy3l' to be consistent with the new EuroQol naming convention.

Usage

eq5dy(scores, country = NULL)

Arguments

scores

numeric with names MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression.

country

value set country.

Value

calculated utility index score.


Calculate EQ-5D-Y-3L index scores

Description

Calculate indices for EQ-5D-Y-3L value sets. Available value sets can be viewed using the function valuesets.

Usage

eq5dy3l(scores, country = NULL, digits = 3)

Arguments

scores

numeric with names MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression.

country

value set country.

digits

number of decimal places to return.

Value

calculated utility index score.

Examples

eq5dy3l(scores=c(MO=3,SC=3,UA=3,PD=3,AD=3), country="Slovenia")


Get all five digit health state scores

Description

Get all five digit health state scores for either EQ-5D-3L, EQ-5D-5L or EQ-5D-Y3L

Usage

get_all_health_states(version)

Arguments

version

the EQ-5D version. Either 3L or 5L.

Value

A character vector of five digit health states.

Examples

get_all_health_states("3L")
get_all_health_states("5L")
get_all_health_states("Y3L")


Get individual dimension scores from their five digit health states

Description

Get a data.frame of individual dimension scores from their five digit health states.

Usage

get_dimensions_from_health_states(
  scores,
  ignore.invalid = TRUE,
  version = "5L"
)

Arguments

scores

a vector of five digit scores

ignore.invalid

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

version

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

Value

A data.frame of individual dimension scores.

Examples

get_dimensions_from_health_states(c("12345", "54321"), version="5L")


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")


Calculate the Health Profile Grid

Description

Calculate the Health Profile Grid (HPG) for two EQ-5D datasets.

Usage

hpg(
  pre,
  post,
  country = NULL,
  version = NULL,
  type = NULL,
  ignore.invalid = TRUE,
  dimensions = .get_dimension_names(),
  no.problems = TRUE
)

Arguments

pre

data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

post

data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

country

string of value set country name used.

version

string of value "3L" or "5L" to indicate instrument version.

type

string specifying method type used in deriving value set scores. Options are TTO or VAS for EQ-5D-3L, VT for EQ-5D-5L, CW for EQ-5D-5L crosswalk conversion valuesets, RCW for EQ-5D-3L reverse crosswalk conversion valuesets.

ignore.invalid

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

dimensions

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

no.problems

boolean. Summarise 11111 "No change" subjects in a "No problems" group.

Value

a data.frame or list of data.frames containing the columns Pre, Post and PCHC. Pre and Post contain the severity rankings and PCHC the PCHC category.

Examples

dat <- read.csv(system.file("extdata", "eq5d3l_example.csv", package="eq5d"))

pre <- dat[dat$Group=="Group1",][1:50,]
post <- dat[dat$Group=="Group2",][1:50,]
res <- hpg(pre, post, country="UK", version="3L", type="TTO")
head(res)


Calculate the Health State Density Index

Description

Calculate the Health State Density Index (HSDI) for an EQ-5D dataset.

Usage

hsdi(scores, version = NULL, ignore.invalid = TRUE, digits = 2, ...)

Arguments

scores

scores data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

version

string of value "3L" or "5L" to indicate instrument version.

ignore.invalid

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

digits

numeric specifying the number of decimal places for percentages. Defaults to 1, use NULL to skip rounding.

...

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

Value

numeric containing the HSDI value.

Examples

dat <- read.csv(system.file("extdata", "eq5d3l_example.csv", package="eq5d"))
hsdi(dat, version="3L")


Calculate the Level Freqeuncy Score for an EQ-5D profile

Description

Calculate the Levels Frequency Score for a single or number of EQ-5D profiles

Usage

lfs(scores, version, ignore.invalid, ...)

Arguments

scores

data.frame with names MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression.

version

string of value "3L", "5L" or "Y3L" to indicate instrument version.

ignore.invalid

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

...

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

Value

a data.frame or list of data.frames of counts/percentages. Columns contain dimensions names and rows the EQ-5D score.

Examples

lfs(c(MO=1,SC=2,UA=3,PD=2,AD=1), version="3L")
lfs(55555, version="5L")
lfs(c(11111, 12345, 55555), version="5L")


Calculate the Level Sum Score for an EQ-5D profile

Description

Calculate the Levels Sum Score for a single or number of EQ-5D profiles

Usage

lss(scores, version, ignore.invalid, ...)

Arguments

scores

data.frame with names MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression.

version

string of value "3L" or "5L" to indicate instrument version.

ignore.invalid

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

...

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

Value

a data.frame or list of data.frames of counts/percentages. Columns contain dimensions names and rows the EQ-5D score.

Examples

lss(c(MO=1,SC=2,UA=3,PD=2,AD=1), version="3L")
lss(55555, version="5L")
lss(c(11111, 12345, 55555), version="5L")


Calculate the Paretian Classification of Health Change

Description

Calculate the Paretian Classification of Health Change (PCHC) for two EQ-5D datasets.

Usage

pchc(
  pre,
  post,
  version = NULL,
  no.problems = TRUE,
  totals = TRUE,
  by.dimension = FALSE,
  ignore.invalid = TRUE,
  dimensions = .get_dimension_names(),
  summary = TRUE
)

Arguments

pre

data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

post

data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

version

string of value "3L" or "5L" to indicate instrument version.

no.problems

boolean. Summarise 11111 "No change" subjects in a "No problems" group.

totals

boolean. Include a summary total.

by.dimension

boolean. Summarise results by each EQ-5D dimension rather than by the whole dataset.

ignore.invalid

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

dimensions

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

summary

boolean. Summarise results or return all classifications.

Value

a data.frame or list of data.frames of changes according to PCHC. contain dimensions names and rows the EQ-5D score or, if summary=FALSE, a vector or list of vectors of changes.

Examples

dat <- read.csv(system.file("extdata", "eq5d3l_example.csv", package="eq5d"))

pre <- dat[dat$Group=="Group1",][1:50,]
post <- dat[dat$Group=="Group2",][1:50,]

pchc(pre, post, version="3L", no.problems=FALSE, totals=FALSE)


Calculate the Probablility of Superiority

Description

Calculate the Probablility of Superiority (PS) for the dimensions of two EQ-5D datasets. Score is less than 0.5 if more patients deteriorate than improve, 0.5 if the same number of patients improve and deteriorate or do not change and greater than 0.5 if more patients improve than deteriorate.

Usage

ps(
  pre,
  post,
  version = NULL,
  ignore.invalid = TRUE,
  dimensions = .get_dimension_names(),
  digits = 2
)

Arguments

pre

data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

post

data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

version

string of value "3L" or "5L" to indicate instrument version.

ignore.invalid

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

dimensions

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

digits

numeric specifying the number of decimal places. Defaults to 2.

Value

a list of Probability of Superiority scores by dimension.

Examples

dat <- read.csv(system.file("extdata", "eq5d3l_example.csv", package="eq5d"))

pre <- dat[dat$Group=="Group1",][1:50,]
post <- dat[dat$Group=="Group2",][1:50,]

ps(pre, post, version="3L")


Calculate Shannon's Index

Description

Calculate Shannon's H' (diversity) index, H' max and Shannon's J' (evenness) index for an EQ-5D data set. This can be calculated both by dimension and for health states as a whole.

Usage

shannon(
  scores,
  version = NULL,
  by.dimension = TRUE,
  ignore.invalid = TRUE,
  dimensions = .get_dimension_names(),
  base = 2,
  digits = 2,
  permutations = TRUE
)

Arguments

scores

data.frame, numeric or character. For data.frame default column names should be MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression. Vector using five digit format can also be used.

version

string of value "3L" or "5L" to indicate instrument version.

by.dimension

boolean whether to calculate scores by EQ-5D dimensions or for the whole dataset. Defaults to TRUE.

ignore.invalid

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

dimensions

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

base

numeric base of logarithm to use. Defaults to base 2.

digits

numeric specifying the number of decimal places. Defaults to 2.

permutations

boolean whether to use maximum number of permutations for H' max or the number of observed unique profiles. Default is TRUE.

Value

a single list or list of dimensions containing H' H' max and J' scores.

Examples

dat <- read.csv(system.file("extdata", "eq5d3l_example.csv", package="eq5d"))

shannon(dat, version="3L", by.dimension=FALSE)
shannon(dat, version="3L", by.dimension=TRUE)


Launch shiny EQ-5D interface

Description

shiny_eq5d launches a shiny interface for browser based EQ-5D calculations.

Usage

shiny_eq5d(display.mode = "normal")

Arguments

display.mode

The display mode to be passed to runApp

Examples

## Not run: 
shiny_eq5d()
shiny_eq5d(display.mode="normal")

## End(Not run)

Get the available EQ-5D value sets.

Description

valuesets returns a data.frame of the available EQ-5D value sets in the eq5d package.

Usage

valuesets(
  type = NULL,
  version = NULL,
  country = NULL,
  references = c("PubMed", "DOI", "ISBN", "ExternalURL")
)

Arguments

type

string EQ-5D value set type. TTO or VAS for EQ-5D-3L, VT for EQ-5D-5L, cTTO for EQ-5D-Y-3L, CW for EQ-5D-5L crosswalk conversion dataset, or DSU for NICE Decision Support Unit's EQ-5D-5L to EQ-5D-3L and EQ-5D-3L to EQ-5D-5L mappings.

version

string either 3L, 5L or Y.

country

string one of the countries for which there is a value set.

references

character vector of reference columns. One or more of PubMed, DOI, ISBN or ExternalURL. Default is all. Reference columns can be removed by setting argument to NULL.

Value

A data.frame containing the EQ-5D version, the value set type and country, along with PubMed IDs, DOIs, ISBNs and external URLs where available.

Examples

valuesets()
valuesets(type="TTO")
valuesets(version="5L")
valuesets(country="UK")
valuesets(version="Y3L", references=c("DOI", "PubMed"))