Learn R Programming

eq5dsuite

The goal of this package is to provide a suite of functions for manipulating and analysing EQ-5D data.

The file structure in the R folder is as follows:

  • init.R: description of the processes taking place every time the package is loaded, e.g. pre-calculation of the crosswalk matrices; based on the analogous file from the eqxwr package.

  • utils.R; EQ_functions.R; eqxwr.R - files based on the files with the same name as those from the eqxwr package but expanded to accept 3L data

  • eqxw.R - file containing forward crosswalk functions; adapted from eqxwr.R

  • eq5d_devlin.R - file containing code for Tables and Figures from the Devlin book (one file per Table or Figure)

  • eq5d_aux.R - secondary files, e.g. wrappers, used in eq5d_devlin.R

In addition,

  • data/example_data.rda is an example dataset that can be used to test eq5d_devlin.R functions

Installation

You can install the development version of eq5dsuite from GitHub with:

# install.packages("devtools")
devtools::install_github("MathsInHealth/eq5dsuite")

Copy Link

Version

Install

install.packages('eq5dsuite')

Monthly Downloads

238

Version

1.0.1

License

GPL (>= 2)

Maintainer

Kim Rand

Last Published

June 24th, 2025

Functions in eq5dsuite (1.0.1)

.pstate3t5

.pstate3t5
eq5d5l

eq5d5l
figure_1_2_5

Figure 1.2.5: Health Profile Grid (HPG) for Two Time Points
figure_1_3_1

Figure 1.3.1: EQ-5D values plotted against LSS
eq5dy3l

eq5dy3l
example_data

example_data
eqxwr

eqxwr
.summary_cts_by_fu

Wrapper to summarise a continuous variable by follow-up (FU)
.summary_table_4_3

Summary wrapper for Table 4.3
eqvs_add

eqvs_add
figure_1_2_1

Figure 1.2.1: Paretian Classification of Health Change (PCHC) by Group This function computes PCHC categories between two time points for each subject, stratifies them by a grouping variable, and produces a single bar chart with side-by-side bars showing the distribution of PCHC categories.
figure_1_2_2

Figure 1.2.2: Percentage of Respondents Who Improved in Each EQ-5D Dimension, by Group This function calculates how many respondents improved in each dimension between two time points and summarizes the results for each group. The, it prodcuces a dimension-focused chart illustrating improvement percentages by dimension.
.summary_table_4_4

Summary wrapper for Table 4.4
eqvs_display

eqvs_display
figure_3_1

Figure 3.1: EQ-5D values by timepoints: mean values and 95% confidence intervals
figure_3_2

Figure 3.2: Mean EQ-5D values and 95% confidence intervals: all vs by groupvar
figure_2_2

Figure 2.2: Mid-point EQ VAS scores
table_1_2_4

Table 1.2.4: Changes in levels in each dimension, percentages of total and of type of change
figure_2_1

Figure 2.1: EQ VAS scores
table_1_3_1

Table 1.3.1: Summary statistics for the EQ-5D values by all the different LSSs (Level Sum Scores)
figure_1_2_4

Figure 1.2.4: Percentage of Respondents Who Had a Mixed Change Overall, by Dimension Improved or Worsened, Grouped by Procedure (or Other Grouping)
figure_1_2_3

Figure 1.2.3: Percentage of Respondents Who Worsened in Each EQ-5D Dimension, by Group
eq5d

eq5d
eq5d3l

eq5d3l
table_1_1_1

Table 1.1.1: Frequency of levels by dimensions, cross-sectional
table_1_1_2

Table 1.1.2: Frequency of levels by dimensions, separated by category
make_all_EQ_states

make_all_EQ_states
figure_3_5

Figure 3.5: EQ-5D values: smoothed lines and confidence intervals by groupvar
make_all_EQ_indexes

make_all_EQ_indexes
eqxw

eqxw
eqvs_load

eqvs_load
figure_3_3

Figure 3.3: EQ-5D values: smoothed lines and confidence intervals by groupvar
table_1_3_4

Table 1.3.4: Summary statistics of EQ-5D values by LFS (Level Frequency Score)
table_2_1

Table 2.1: EQ VAS Score by timepoints
table_3_2

Table 3.2 EQ-5D values: by groupvar
table_3_3

Table 3.3 EQ-5D values: by age and groupvar
table_2_2

Table 2.2: EQ VAS Scores frequency of mid-points
table_3_1

Table 3.1: EQ-5D values: by timepoints
table_1_1_3

Table 1.1.3: Prevalence of the 10 most frequently observed self-reported health states
table_1_2_1

Table 1.2.1: Frequency of levels by dimensions, by follow-up
table_1_3_2

Table 1.3.2: Distribution of the EQ-5D states by LFS (Level Frequency Score)
figure_3_4

Figure 3.4: EQ-5D values: smoothed lines and confidence intervals by groupvar
table_1_3_3

Table 1.3.3: Number of observations in the LFS (Level Frequency Score) according to the EQ-5D values
eqxw_UK

eqxw_UK
figure_1_3_2

Figure 1.3.2: EQ-5D values plotted against LFS
figure_1_4_1

Figure 1.4.1: Generate a Health State Density Curve (HSDC) for EQ-5D Data
toEQ5Ddims

toEQ5Ddims
make_dummies

EQ_dummies
table_1_2_2

Table 1.2.2: Changes in health according to the PCHC (Paretian Classification of Health Change)
toEQ5Dindex

toEQ5DIndex
table_1_2_3

Table 1.2.3: Changes in health according to the PCHC, taking account of those with no problems
.add_utility

Add utility values to a data frame
.gen_colours

Generate colours for PCHC figures
.EQxwrprob

.EQxwrprob
.get_names

Replace NULL names with default values
.getmode

Get the mode of a vector.
.check_uniqueness

Check the uniqueness of groups This function takes a data frame `df` and a vector of columns `group_by`, and checks whether the combinations of values in the columns specified by `group_by` are unique. If the combinations are not unique, a warning message is printed.
.freqtab

Helper function for frequency of levels by dimensions tables
.modify_ggplot_theme

Modify ggplot2 theme
.pchc

Wrapper to determine Paretian Classification of Health Change
.get_lfs

Calculate the Level Frequency Score (LFS)
.pchctab

.pchctab: Changes in health according to the PCHC (Paretian Classification of Health Change)
.pchc_plot_by_dim

Wrapper to generate Paretian Classification of Health Change plot by dimension
.summary_mean_ci

Wrapper to calculate summary mean with 95% confidence interval
.prep_vas

Data checking/preparation: VAS variable
.prep_eq5d

Data checking/preparation: EQ-5D variables
.pstate5t3

.pstate5t3
.prep_fu

Data checking/preparation: follow-up variable
eqvs_drop

eqvs_drop
.summary_table_2_1

Wrapper for the repetitive code in function_table_2_1. Data frame summary