A QALY is a QALY is a QALY

An R package for quality-adjusted life-years (QALY) calculation and manipulation.

Currently contains functions to:

- Create QALY type object
- Discounting
- Health State Utility Values (HSUV)
- Inflation-adjusted costs

To install the development version from github:

```
library(devtools)
install_github("Health-Economics-in-R/QALY")
```

Then, to load the package, use:

`library(QALY)`

In cost-utility analyses arguably the most commonly used unit of health outcome is the QALY. There are others, most notably the diability-adjusted life-year (DALY). Calculation of QALYs consist of time and utility components. Time may be some predefined time horizon or an individual’s excess life time. The utilities are health preference measures scaled between 0 and 1. These can be derived from such things as patient recorded outcome measures (PROMs), using surveys such as EuroQol-5D (EQ-5D) or the Short Form-36D/Short Form-6D (SF-6D). Co-morbidities, requiring some combining of utilities, may also be required.

QALY calculation in cost-effectiveness analyses is often done in an ad-hoc, project-by-project way. The aim of this package is to standardise these calculations and provide an easy-to-use suite of functions for the most common operations involving QALYs.

`suppressMessages(library(QALY))`

```
#> Warning: package 'dplyr' was built under R version 3.4.4
#> Warning: package 'purrr' was built under R version 3.4.4
```

Combined two co-morbidity utilities using the product approach:

TODO use expected remaining life time…

Create a adjusted life-year type object which contains all the information needed to do subsequent operations:

```
personHealthYears <-
person_health_years(
start_year = 2016,
end_year = 2020,
age = 33,
time_horizon = NA,
utility = tot_utility,
discount_rate = 0.035)
```

Calculate QALYS:

`HRQoL_year <- total_QALYs(personHealthYears)`

`print(HRQoL_year)`

```
#> [1] 0.5900000 0.5700483 0.5507713 0.5321462 NA NA NA
#> [8] NA NA NA NA NA NA NA
#> [15] NA NA NA NA NA NA NA
#> [22] NA NA NA NA NA NA NA
#> [29] NA NA NA NA NA NA NA
#> [36] NA NA NA NA NA NA NA
#> [43] NA NA NA NA NA NA NA
#> [50] NA NA NA NA NA NA NA
#> [57] NA NA NA NA NA NA NA
#> [64] NA NA NA NA NA NA NA
#> [71] NA NA NA NA NA NA NA
#> [78] NA NA NA NA NA NA NA
#> [85] NA NA NA NA NA NA NA
#> [92] NA NA NA NA NA NA NA
#> [99] NA NA
#> attr(,"class")
#> [1] "HRQoL" "numeric"
#> attr(,"person_health_years")
#> $start_year
#> [1] 2016
#>
#> $end_year
#> [1] 2020
#>
#> $delay
#> [1] 0
#>
#> $age
#> [1] 33
#>
#> $time_horizon
#> [1] 4
#>
#> $utility
#> [1] 0.72 0.72 0.72 0.72
#>
#> $QoL
#> [1] 0.87 0.87 0.87 0.87 0.87
#>
#> $discount_rate
#> [1] 0.035
#>
#> $death
#> [1] NA
#>
#> $utility_method
#> [1] "add"
#>
#> $period
#> [1] 1 1 1 1
#>
#> attr(,"class")
#> [1] "person_health_years" "list"
```

`summary(HRQoL_year)`

Print a graph of the HRQoL over time: using ggplot2?

`plot(HRQoL_year)`

See package vignette for more details and examples.