Learn R Programming

⚠️There's a newer version (1.0.1) of this package.Take me there.

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.0

License

GPL (>= 2)

Maintainer

Kim Rand

Last Published

May 21st, 2024

Functions in eq5dsuite (1.0.0)

.prep_fu

Data checking/preparation: follow-up variable
.prep_eq5d

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

.pstate5t3
eqvs_load

eqvs_load
eqvs_drop

eqvs_drop
eqvs_add

eqvs_add
eqvs_display

eqvs_display
figure_1_3_2

Figure 1.3.2: EQ-5D values plotted against LFS
.summary_table_4_3

Summary wrapper for Table 4.3
eqxwr

eqxwr
figure_1_2_4

Figure 1.2.4: Percentage of respondents who had a mixed change by the dimensions in which they improved and worsened (%)
figure_2_1

Figure 2.1: EQ VAS scores
figure_1_3_1

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

eqxw
.summary_table_4_4

Summary wrapper for Table 4.4
figure_3_2

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

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

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

make_all_EQ_indexes
make_all_EQ_states

make_all_EQ_states
make_dummies

EQ_dummies
table_1_2_1

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

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

eq5d
example_data

example_data
table_2_1

Table 2.1: EQ VAS Score by timepoints
eq5d3l

eq5d3l
figure_1_2_1

Figure 1.2.1: Paretian Classification of Health Change
table_1_1_2

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

eq5d5l
.summary_cts_by_fu

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

eq5dy3l
figure_1_2_2

Figure 1.2.2: Percentage of respondents who improved overall by the dimensions (%)
table_2_2

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

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

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

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

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

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

Table 3.2 EQ-5D values: by groupvar
figure_3_1

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

Figure 1.2.3: Percentage of respondents who worsened overall by the dimensions (%)
figure_2_2

Figure 2.2: Mid-point EQ VAS scores
table_1_1_1

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

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

toEQ5DIndex
table_1_2_3

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

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

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

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

toEQ5Ddims
.modify_ggplot_theme

Modify ggplot2 theme
.getmode

Get the mode of a vector.
.EQxwrprob

.EQxwrprob
.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.
.gen_colours

Generate colours for PCHC figures
.get_names

Replace NULL names with default values
.pchc

Wrapper to determine Paretian Classification of Health Change
.freqtab

Helper function for frequency of levels by dimensions tables
.get_lfs

Calculate the Level Frequency Score (LFS)
.prep_vas

Data checking/preparation: VAS variable
.pstate3t5

.pstate3t5
.summary_table_2_1

Wrapper for the repetitive code in function_table_2_1. Data frame summary
.summary_mean_ci

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

Add utility values to a data frame
.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