-
Notifications
You must be signed in to change notification settings - Fork 5
/
README.Rmd
120 lines (86 loc) · 3.33 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
output: github_document
---
# QALY <img src="imgfile.png" height="139" align="right"/>
[![Build Status](https://travis-ci.org/n8thangreen/QALY.svg?branch=master)](https://travis-ci.org/n8thangreen/QALY)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/n8thangreen/QALY?branch=master&svg=true)](https://ci.appveyor.com/project/n8thangreen/QALY)
[![Coverage status](https://codecov.io/gh/n8thangreen/QALY/branch/master/graph/badge.svg)](https://codecov.io/github/n8thangreen/QALY?branch=master)
[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, setup, echo = FALSE, message = FALSE}
knitr::opts_chunk$set(
comment = "#>",
tidy = FALSE,
error = FALSE,
fig.width = 5,
fig.height = 5)
```
> 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 do
Request welcome; please use [Issues](https://github.com/n8thangreen/QALY/issues)
- Other HSUV methods
- Improved plotting
> :warning: This package is in development so is not assured to work.
## Installing QALY
To install the development version from github:
```{r eval=FALSE}
library(devtools)
install_github("Health-Economics-in-R/QALY")
```
Then, to load the package, use:
```{r eval=FALSE}
library(QALY)
```
## Motivation
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.
## Basic example
```{r}
suppressMessages(library(QALY))
```
Combined two co-morbidity utilities using the product approach:
```{r}
HSUV_prod <- HSUV(method = "prod")
tot_utility <- HSUV_prod(c(0.9, 0.8))
```
TODO use expected remaining life time...
Create a adjusted life-year type object which contains all the information needed to do subsequent operations:
```{r}
personHealthYears <-
person_health_years(
start_year = 2016,
end_year = 2020,
age = 33,
time_horizon = NA,
utility = tot_utility,
discount_rate = 0.035)
```
Calculate QALYS:
```{r}
HRQoL_year <- total_QALYs(personHealthYears)
```
```{r}
print(HRQoL_year)
summary(HRQoL_year)
```
Print a graph of the HRQoL over time:
using ggplot2?
```{r}
plot(HRQoL_year)
```
See package [vignette](http://htmlpreview.github.io/?https://github.com/n8thangreen/QALY/blob/master/inst/doc/vignette_main.html) for more details and examples.
## License
GPL-3 ©