THR-deltaPSA.R 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. library(tidyverse)
  2. library(here)
  3. theta_mean <- c(-5.490935,
  4. -0.0367022,
  5. 0.768536,
  6. -1.344474,
  7. 0.3740968,
  8. -4.0944849,
  9. -4.0944849,
  10. -3.2869827,
  11. log(5294^2 / sqrt(1487 ^ 2 + 5294 ^ 2)),
  12. 1.753857,
  13. 1.1100567,
  14. -0.8513930)
  15. theta_var <- matrix(0, 12, 12)
  16. theta_var[1:5,1:5] <- c(+4.32191e-2, -7.83e-4, -7.247e-3, -6.42e-4, -5.691e-3,
  17. -7.83e-4, +2.71566e-5, +3.3e-5, -1.1e-4, +2.8e-8,
  18. -7.247e-3, +3.3e-5, +1.18954e-2, +1.84e-4, +5.1e-6,
  19. -6.42e-4, -1.11e-4, +1.84e-4, +1.46369e-1, +2.59e-4,
  20. -5.691e-3, +2.8e-8, +5.1e-6, +2.59e-4, +2.25151e-3)
  21. theta_var[6,6] <- 0.6527744^2
  22. theta_var[7,7] <- 0.6527744^2
  23. theta_var[8,8] <- 0.4889407^2
  24. theta_var[9,9] <- log(1487^2/5294^2 + 1)
  25. theta_var[10,10] <- 0.235360^2
  26. theta_var[11,11] <- 0.2147719^2
  27. theta_var[12,12] <- 0.1433964^2
  28. state_labels <- c("Standard_SuccessP", "Standard_Revision", "Standard_SuccessR", "Standard_Death",
  29. "NP1_SuccessP", "NP1_Revision", "NP1_SuccessR", "NP1_Death")
  30. cycle_labels <- 1:60
  31. output_labels <- c("Standard_Costs", "Standard_QALYs", "NP1_Costs", "NP1_QALYs", "Incremental_Costs", "Incremental_QALYs")
  32. param_labels <- c("beta_0", "beta_age", "beta_male", "beta_NP1", "ln_gamma", "logit_phi", "logit_psi", "logit_rho", "ln_C", "logit_U_SuccessP", "logit_U_SuccessR", "logit_U_Revision")
  33. names(theta_mean) <- param_labels
  34. dimnames(theta_var) <- list(theta_i = param_labels, theta_j = param_labels)
  35. age <- 60
  36. male <- 0
  37. mortality <- function(age, male) {
  38. if (male) {
  39. if (age < 45) 0.00151
  40. else if (age < 55) 0.00393
  41. else if (age < 65) 0.0109
  42. else if (age < 75) 0.0316
  43. else if (age < 85) 0.0801
  44. else 0.1879
  45. } else {
  46. if (age < 45) 0.00099
  47. else if (age < 55) 0.0026
  48. else if (age < 65) 0.0067
  49. else if (age < 75) 0.0193
  50. else if (age < 85) 0.0535
  51. else 0.1548
  52. }
  53. }
  54. logit <- function(p) log(p) - log(1 - p)
  55. expit <- function(x) 1 / (1 + exp(-x))
  56. x <- array(0, dim = c(8, 60), dimnames = list(state = state_labels, cycle = cycle_labels))
  57. P <- array(0, dim = c(8, 8, 60), dimnames = list(state_from = state_labels, state_to = state_labels, cycle = cycle_labels))
  58. V <- array(0, dim = c(8, 6, 60), dimnames = list(state = state_labels, output = output_labels, cycle = cycle_labels))
  59. gt <- array(NA_real_, dim = c(6, 60), dimnames = list(output = output_labels, cycle = cycle_labels))
  60. dx <- array(0, dim = c(8, 60, 12), dimnames = list(state = state_labels, cycle = cycle_labels, theta_i = param_labels))
  61. d2x <- array(0, dim = c(8, 60, 12, 12), dimnames = list(state = state_labels, cycle = cycle_labels, theta_i = param_labels, theta_j = param_labels))
  62. dP <- array(0, dim = c(8, 8, 60, 12), dimnames = list(state_from = state_labels, state_to = state_labels, cycle = cycle_labels, theta_i = param_labels))
  63. d2P <- array(0, dim = c(8, 8, 60, 12, 12), dimnames = list(state_from = state_labels, state_to = state_labels, cycle = cycle_labels, theta_i = param_labels, theta_j = param_labels))
  64. dV <- array(0, dim = c(8, 6, 60, 12), dimnames = list(state = state_labels, output = output_labels, cycle = cycle_labels, theta_i = param_labels))
  65. d2V <- array(0, dim = c(8, 6, 60, 12, 12), dimnames = list(state = state_labels, output = output_labels, cycle = cycle_labels, theta_i = param_labels, theta_j = param_labels))
  66. dgt <- array(NA_real_, dim = c(6, 60, 12), dimnames = list(output = output_labels, cycle = cycle_labels, theta_i = param_labels))
  67. d2gt <- array(NA_real_, dim = c(6, 60, 12, 12), dimnames = list(output = output_labels, cycle = cycle_labels, theta_i = param_labels, theta_j = param_labels))
  68. # INITIAL STATE DISTRIBUTION
  69. x[4, 1] <- expit(theta_mean[6])
  70. x[1, 1] <- 1 - x[4, 1]
  71. x[8, 1] <- expit(theta_mean[6])
  72. x[5, 1] <- 1 - x[8, 1]
  73. # TRANSITION MATRIX
  74. P[4, 4, ] <- 1
  75. P[8, 8, ] <- 1
  76. for (t in 1:60) {
  77. rt_Standard <- 1 - exp(exp(theta_mean[1] + theta_mean[2] * age + theta_mean[3] * male) * ((t - 1)^exp(theta_mean[5]) - t^exp(theta_mean[5])))
  78. rt_NP1 <- 1 - exp(exp(theta_mean[1] + theta_mean[2] * age + theta_mean[3] * male + theta_mean[4]) * ((t - 1)^exp(theta_mean[5]) - t^exp(theta_mean[5])))
  79. P[1, 2, t] <- rt_Standard
  80. P[5, 6, t] <- rt_NP1
  81. P[1, 4, t] <- mortality(age + t, male)
  82. P[2, 4, t] <- mortality(age + t, male) + expit(theta_mean[7])
  83. P[3, 4, t] <- mortality(age + t, male)
  84. P[5, 8, t] <- mortality(age + t, male)
  85. P[6, 8, t] <- mortality(age + t, male) + expit(theta_mean[7])
  86. P[7, 8, t] <- mortality(age + t, male)
  87. P[3, 2, t] <- expit(theta_mean[8])
  88. P[7, 6, t] <- expit(theta_mean[8])
  89. P[1, 1, t] <- 1 - P[1, 2, t] - P[1, 4, t]
  90. P[2, 3, t] <- 1 - P[2, 4, t]
  91. P[3, 3, t] <- 1 - P[3, 2, t] - P[3, 4, t]
  92. P[5, 5, t] <- 1 - P[5, 6, t] - P[5, 8, t]
  93. P[6, 7, t] <- 1 - P[6, 8, t]
  94. P[7, 7, t] <- 1 - P[7, 6, t] - P[7, 8, t]
  95. }
  96. # VALUE MATRIX
  97. V_base <- matrix(0, 8, 6)
  98. V_base[2, 1] <- exp(theta_mean[9])
  99. V_base[2, 5] <- -exp(theta_mean[9])
  100. V_base[6, c(3, 5)] <- exp(theta_mean[9])
  101. V_base[1, 2] <- expit(theta_mean[10])
  102. V_base[1, 6] <- -expit(theta_mean[10])
  103. V_base[5, 4] <- expit(theta_mean[10])
  104. V_base[5, 6] <- expit(theta_mean[10])
  105. V_base[3, 2] <- expit(theta_mean[11])
  106. V_base[3, 6] <- -expit(theta_mean[11])
  107. V_base[7, 4] <- expit(theta_mean[11])
  108. V_base[7, 6] <- expit(theta_mean[11])
  109. V_base[2, 2] <- expit(theta_mean[12])
  110. V_base[2, 6] <- -expit(theta_mean[12])
  111. V_base[6, 4] <- expit(theta_mean[12])
  112. V_base[6, 6] <- expit(theta_mean[12])
  113. for (t in 1:60) {
  114. V[, , t] <- V_base %*% diag(rep(c(1.06^(-t), 1.015^(-t)), 3), 6, 6)
  115. }
  116. # STANDARD MARKOV COHORT SIMULATION
  117. g0 <- c(394, 0, 579, 0, 579 - 394, 0)
  118. gt[, 1] <- t(V[, , 1]) %*% x[, 1]
  119. for (t in 2:60) {
  120. x[, t] <- t(P[, , t-1]) %*% x[, t-1]
  121. gt[, t] <- t(V[, , t]) %*% x[, t]
  122. }
  123. g <- g0 + rowSums(gt)
  124. # DELTA METHOD
  125. # - Transition matrix (use symbolic differentiation, but exclude mortality as constant)
  126. P11 <- expression(exp(exp(theta1 + theta2 * age + theta3 * male) * ((t - 1)^exp(theta5) - t^exp(theta5))))
  127. P12 <- expression(1 - exp(exp(theta1 + theta2 * age + theta3 * male) * ((t - 1)^exp(theta5) - t^exp(theta5))))
  128. P23 <- expression(1 - 1/(1+exp(-theta7)))
  129. P24 <- expression(1/(1+exp(-theta7)))
  130. P32 <- expression(1/(1+exp(-theta8)))
  131. P33 <- expression(1 - 1/(1+exp(-theta8)))
  132. P55 <- expression(exp(exp(theta1 + theta2 * age + theta3 * male + theta4) * ((t - 1)^exp(theta5) - t^exp(theta5))))
  133. P56 <- expression(1 - exp(exp(theta1 + theta2 * age + theta3 * male + theta4) * ((t - 1)^exp(theta5) - t^exp(theta5))))
  134. P67 <- expression(1 - 1/(1+exp(-theta7)))
  135. P68 <- expression(1/(1+exp(-theta7)))
  136. P76 <- expression(1/(1+exp(-theta8)))
  137. P77 <- expression(1 - 1/(1+exp(-theta8)))
  138. dP11 <- deriv3(P11, paste0("theta", 1:12))
  139. dP12 <- deriv3(P12, paste0("theta", 1:12))
  140. dP23 <- deriv3(P23, paste0("theta", 1:12))
  141. dP24 <- deriv3(P24, paste0("theta", 1:12))
  142. dP32 <- deriv3(P32, paste0("theta", 1:12))
  143. dP33 <- deriv3(P33, paste0("theta", 1:12))
  144. dP55 <- deriv3(P55, paste0("theta", 1:12))
  145. dP56 <- deriv3(P56, paste0("theta", 1:12))
  146. dP67 <- deriv3(P67, paste0("theta", 1:12))
  147. dP68 <- deriv3(P68, paste0("theta", 1:12))
  148. dP76 <- deriv3(P76, paste0("theta", 1:12))
  149. dP77 <- deriv3(P77, paste0("theta", 1:12))
  150. param_list <- set_names(as.list(theta_mean), paste0("theta", 1:12))
  151. grad <- purrr::attr_getter("gradient")
  152. hessian <- purrr::attr_getter("hessian")
  153. from_ <- rep(c(1, 2, 3, 5, 6, 7), each = 2)
  154. to_ <- c(1:4, 2, 3, 5:8, 6, 7)
  155. for (t in 1:60) {
  156. param_list$t <- pmax(t, 1 + 1e-10)
  157. walk2(from_, to_, function(f_, t_) {
  158. tmp <- eval(get(paste0("dP", f_, t_)), param_list)
  159. dP[f_, t_, t, ] <<- unname(grad(tmp))[1, ]
  160. d2P[f_, t_, t, , ] <<- unname(hessian(tmp))[1, , ]
  161. })
  162. }
  163. # - Value matrix
  164. # - Utilities
  165. dV[1, 2, , 10] <- -exp(-theta_mean[10]) * (1 + exp(-theta_mean[10])) ^ (-2) * 1.015 ^ (-(1:60)) # V[1, 2, t] = U_SuccessP 1.015^(-t)
  166. dV[1, 6, , 10] <- -dV[1, 2, , 10]
  167. dV[2, 2, , 12] <- -exp(-theta_mean[12]) * (1 + exp(-theta_mean[12])) ^ (-2) * 1.015 ^ (-(1:60))
  168. dV[2, 6, , 12] <- -dV[2, 2, , 12]
  169. dV[3, 2, , 11] <- -exp(-theta_mean[11]) * (1 + exp(-theta_mean[11])) ^ (-2) * 1.015 ^ (-(1:60))
  170. dV[3, 6, , 11] <- -dV[3, 2, , 11]
  171. dV[5, 4, , 10] <- -exp(-theta_mean[10]) * (1 + exp(-theta_mean[10])) ^ (-2) * 1.015 ^ (-(1:60))
  172. dV[5, 6, , 10] <- dV[5, 4, , 10]
  173. dV[6, 4, , 12] <- -exp(-theta_mean[12]) * (1 + exp(-theta_mean[12])) ^ (-2) * 1.015 ^ (-(1:60))
  174. dV[6, 6, , 12] <- dV[6, 4, , 12]
  175. dV[7, 4, , 11] <- -exp(-theta_mean[11]) * (1 + exp(-theta_mean[11])) ^ (-2) * 1.015 ^ (-(1:60))
  176. dV[7, 6, , 11] <- dV[7, 4, , 11]
  177. d2V[1, 2, , 10, 10] <- exp(-theta_mean[10]) * (1 - exp(-theta_mean[10])) * (1 + exp(-theta_mean[10])) ^ (-3) * 1.015 ^ (-(1:60))
  178. d2V[1, 6, , 10, 10] <- -d2V[1, 2, , 10, 10]
  179. d2V[2, 2, , 12, 12] <- exp(-theta_mean[12]) * (1 - exp(-theta_mean[12])) * (1 + exp(-theta_mean[12])) ^ (-3) * 1.015 ^ (-(1:60))
  180. d2V[2, 6, , 12, 12] <- -d2V[2, 2, , 12, 12]
  181. d2V[3, 2, , 11, 11] <- exp(-theta_mean[11]) * (1 - exp(-theta_mean[11])) * (1 + exp(-theta_mean[11])) ^ (-3) * 1.015 ^ (-(1:60))
  182. d2V[3, 6, , 11, 11] <- -d2V[3, 2, , 11, 11]
  183. d2V[5, 4, , 10, 10] <- exp(-theta_mean[10]) * (1 - exp(-theta_mean[10])) * (1 + exp(-theta_mean[10])) ^ (-3) * 1.015 ^ (-(1:60))
  184. d2V[5, 6, , 10, 10] <- d2V[5, 4, , 10, 10]
  185. d2V[6, 4, , 12, 12] <- exp(-theta_mean[12]) * (1 - exp(-theta_mean[12])) * (1 + exp(-theta_mean[12])) ^ (-3) * 1.015 ^ (-(1:60))
  186. d2V[6, 6, , 12, 12] <- d2V[6, 4, , 12, 12]
  187. d2V[7, 4, , 11, 11] <- exp(-theta_mean[11]) * (1 - exp(-theta_mean[11])) * (1 + exp(-theta_mean[11])) ^ (-3) * 1.015 ^ (-(1:60))
  188. d2V[7, 6, , 11, 11] <- d2V[7, 4, , 11, 11]
  189. # - Costs
  190. dV[2, 1, , 9] <- V[2, 1, ] # V[2, 1, t] = exp(theta[9]) 1.06^(-t)
  191. dV[2, 5, , 9] <- V[2, 5, ]
  192. dV[6, 3, , 9] <- V[6, 3, ]
  193. dV[6, 5, , 9] <- V[6, 5, ]
  194. d2V[2, 1, , 9, 9] <- V[2, 1, ]
  195. d2V[2, 5, , 9, 9] <- V[2, 5, ]
  196. d2V[6, 3, , 9, 9] <- V[6, 3, ]
  197. d2V[6, 5, , 9, 9] <- V[6, 5, ]
  198. # - Initial state distribution
  199. dx[c(1, 4, 5, 8), 1, 6] <- c(-1, 1, -1, 1) * exp(-theta_mean[6]) * (1 + exp(-theta_mean[6])) ^ (-2)
  200. d2x[c(1, 4, 5, 8), 1, 6, 6] <- c(1, -1, 1, -1) * exp(-theta_mean[6]) * (1 - exp(-theta_mean[6])) * (1 + exp(-theta_mean[6])) ^ (-3)
  201. for (i in 1:12) {
  202. dgt[, 1, i] <- t(dV[, , 1, i]) %*% x[, 1] + t(V[, , 1]) %*% dx[, 1, i]
  203. for (j in 1:12) {
  204. d2gt[, 1, i, j] <- t(d2V[, , 1, i, j]) %*% x[, 1] +
  205. t(dV[, , 1, i]) %*% dx[, 1, j] +
  206. t(dV[, , 1, j]) %*% dx[, 1, i] +
  207. t(V[, , 1]) %*% d2x[, 1, i, j]
  208. }
  209. }
  210. # - Recurrence relation
  211. for (t in 2:60) {
  212. for (i in 1:12) {
  213. dx[, t, i] <- t(dP[, , t-1, i]) %*% x[, t-1] + t(P[, , t-1]) %*% dx[, t-1, i]
  214. dgt[, t, i] <- t(dV[, , t, i]) %*% x[, t] + t(V[, , t]) %*% dx[, t-1, i]
  215. for (j in 1:12) {
  216. d2x[, t, i, j] <- t(d2P[, , t-1, i, j]) %*% x[, t-1] +
  217. t(dP[, , t-1, i]) %*% dx[, t-1, j] +
  218. t(dP[, , t-1, j]) %*% dx[, t-1, i] +
  219. t(P[, , t-1]) %*% d2x[, t-1, i, j]
  220. d2gt[, t, i, j] <- t(d2V[, , t, i, j]) %*% x[, t] +
  221. t(dV[, , t, i]) %*% dx[, t, j] +
  222. t(dV[, , t, j]) %*% dx[, t, i] +
  223. t(V[, , t]) %*% d2x[, t, i, j]
  224. }
  225. }
  226. }
  227. # RESULTS!
  228. dg <- apply(dgt, c(1, 3), sum)
  229. d2g <- apply(d2gt, c(1, 3, 4), sum)
  230. g_expected <- sapply(1:6, function(v) g[v] + 0.5 * sum(d2g[v, , ] * theta_var))
  231. g_variance <- dg %*% theta_var %*% t(dg)
  232. g_sd <- sqrt(diag(g_variance))
  233. # COMPARE WITH PSA
  234. g_psa <- readRDS(here("THR-MCPSA.rds"))
  235. library(patchwork)
  236. p_standard_costs <- ggplot(g_psa, aes(x = Standard_Costs)) +
  237. geom_density() +
  238. stat_function(fun = dnorm, args = list(mean = g_expected[1], sd = g_sd[1]), linetype = "dashed", colour = "blue") +
  239. scale_x_continuous("Lifetime costs", labels = scales::dollar_format(prefix = "£")) +
  240. ggtitle("Costs for standard prosthesis") +
  241. theme(axis.text.y = element_blank(), axis.ticks.y = element_blank(), axis.title.y = element_blank())
  242. p_standard_QALYs <- ggplot(g_psa, aes(x = Standard_QALYs)) +
  243. geom_density() +
  244. stat_function(fun = dnorm, args = list(mean = g_expected[2], sd = g_sd[2]), linetype = "dashed", colour = "blue") +
  245. scale_x_continuous("Quality adjusted life years (QALYs)") +
  246. ggtitle("QALYs for standard prosthesis") +
  247. theme(axis.text.y = element_blank(), axis.ticks.y = element_blank(), axis.title.y = element_blank())
  248. p_NP1_costs <- ggplot(g_psa, aes(x = NP1_Costs)) +
  249. geom_density() +
  250. stat_function(fun = dnorm, args = list(mean = g_expected[3], sd = g_sd[3]), linetype = "dashed", colour = "blue") +
  251. scale_x_continuous("Lifetime costs", labels = scales::dollar_format(prefix = "£")) +
  252. ggtitle("Costs for NP1 prosthesis") +
  253. theme(axis.text.y = element_blank(), axis.ticks.y = element_blank(), axis.title.y = element_blank())
  254. p_NP1_QALYs <- ggplot(g_psa, aes(x = NP1_QALYs)) +
  255. geom_density() +
  256. stat_function(fun = dnorm, args = list(mean = g_expected[4], sd = g_sd[4]), linetype = "dashed", colour = "blue") +
  257. scale_x_continuous("Quality adjusted life years (QALYs)") +
  258. ggtitle("QALYs for NP1 prosthesis") +
  259. theme(axis.text.y = element_blank(), axis.ticks.y = element_blank(), axis.title.y = element_blank())
  260. p_inc_costs <- ggplot(g_psa, aes(x = Incremental_Costs)) +
  261. geom_density() +
  262. stat_function(fun = dnorm, args = list(mean = g_expected[5], sd = g_sd[5]), linetype = "dashed", colour = "blue") +
  263. scale_x_continuous("Lifetime costs", labels = scales::dollar_format(prefix = "£")) +
  264. ggtitle("Incremental costs") +
  265. theme(axis.text.y = element_blank(), axis.ticks.y = element_blank(), axis.title.y = element_blank())
  266. p_inc_QALYs <- ggplot(g_psa, aes(x = Incremental_QALYs)) +
  267. geom_density() +
  268. stat_function(fun = dnorm, args = list(mean = g_expected[6], sd = g_sd[6]), linetype = "dashed", colour = "blue") +
  269. scale_x_continuous("Quality adjusted life years (QALYs)") +
  270. ggtitle("Incremental QALYs") +
  271. theme(axis.text.y = element_blank(), axis.ticks.y = element_blank(), axis.title.y = element_blank())
  272. (p_standard_costs + p_NP1_costs + p_inc_costs) / (p_standard_QALYs + p_NP1_QALYs + p_inc_QALYs)
  273. ggsave(here("Delta-PSA comparison.png"), width = 20.28, height = 10.62, units = "cm")
  274. wtp <- seq(0, 10000, by = 100)
  275. ceac_psa <- sapply(wtp, function(lambda) mean(lambda * g_psa$Incremental_QALYs >= g_psa$Incremental_Costs))
  276. m <- - g_expected[5] + wtp * g_expected[6]
  277. s <- sqrt(wtp ^ 2 * g_variance[6,6] - 2 * wtp * g_variance[5,6] + g_variance[5,5])
  278. ggplot(tibble(x = wtp, ceac.delta = pnorm(m/s), ceac.psa = ceac_psa), aes(x)) +
  279. geom_line(aes(y = ceac.delta, linetype = "Delta-PSA", colour = "Delta-PSA")) +
  280. geom_line(aes(y = ceac.psa, linetype = "MC-PSA", colour = "MC-PSA")) +
  281. scale_x_continuous("Willingness-to-pay for additional QALY", labels = scales::dollar_format(prefix = "£")) +
  282. scale_y_continuous("Probability NP1 is cost-effective", labels = scales::percent_format()) +
  283. scale_colour_discrete("Method") +
  284. scale_linetype_discrete("Method")
  285. ggsave(here("Delta-PSA CEAC.png"), width = 20.28, height = 10.62, units = "cm", scale = 0.8)
  286. evpi_psa <- sapply(wtp, function(lambda) {
  287. inmb <- lambda * g_psa$Incremental_QALYs - g_psa$Incremental_Costs
  288. evpi <- mean(abs(inmb)) - abs(mean(inmb))
  289. evpi
  290. })
  291. evpi_delta <- (s * sqrt(2/pi) * exp(-m^2 / (2 * s^2)) - m * (1 - 2 * pnorm(m/s))) - abs(m)
  292. ggplot(tibble(x = wtp, evpi.delta = evpi_delta, evpi.psa = evpi_psa), aes(x)) +
  293. geom_line(aes(y = evpi.delta, linetype = "Delta-PSA", colour = "Delta-PSA")) +
  294. geom_line(aes(y = evpi.psa, linetype = "MC-PSA", colour = "MC-PSA")) +
  295. scale_x_continuous("Willingness-to-pay for additional QALY", labels = scales::dollar_format(prefix = "£")) +
  296. scale_y_continuous("Expected value of perfect information", labels = scales::dollar_format(prefix = "£")) +
  297. scale_colour_discrete("Method") +
  298. scale_linetype_discrete("Method")
  299. ggsave(here("Delta-PSA EVPI.png"), width = 20.28, height = 10.62, units = "cm", scale = 0.8)