You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.Rmd
+3-1
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ A second vignette, `vignette("background-mortality")` illustrates how, after fit
77
77
78
78
The package requires version 4.1 of R (due to use of the [native pipe](https://www.r-bloggers.com/2021/05/the-new-r-pipe/)). Please ensure R is updated first.
79
79
80
-
The development version of *psm3mkv* may be downloaded as follows:
80
+
Version 0.2 of *psm3mkv*is the latest minor release, and may be downloaded as follows.
81
81
82
82
```r
83
83
# Install version 0.2 from Github as follows, with the vignette
## Application to three state cost-effectiveness model structures
66
67
67
68
### Partitioned Survival Model (PSM)
68
69
69
-
The restricted mean time in the PF state and time alive are integrals over the time horizon, $T$, of the survival functions of PFS and OS. In both cases, the hazard functions must be constrained to be at least as great as the hazard for background mortality. The hazard for the time in PF and time alive (OS) are as follows.
70
+
The RMD in the PF state and time alive are integrals over the time horizon, $T$, of the survival functions of PFS and OS. Under Approach 2, the hazard functions must be constrained to be at least as great as the hazard for background mortality. The hazard for the time in PF and time alive (OS) are as follows.
@@ -80,12 +81,14 @@ Formulas for the mean time in PF and OS are shown in the accompanying article in
80
81
Adjusting for background mortality requires adjusting the hazard (and equivalently survival) functions of endpoints relating to mortality, PPD and PPS. This is straightforward for PPD:
But it is more complex for the PPS endpoint because, in the case of the Clock Reset model, its hazard (and survival) is a function of two times rather than just one. This package does not provide integral solutions relying on continuous time for RMDs, and must instead rely on discretization.
86
87
87
88
Spreadsheet-based economic models almost always rely on discretizing time into timesteps rather than follow the integral formulas described above for continuous time. As long as timesteps are reasonably short, restricted mean duration results should remain reasonably accurate. Derided as a "kludge", half-cycle corrections are nevertheless recommended.[5]
88
89
90
+
## Illustration of calculations
91
+
89
92
### Set-up
90
93
91
94
First we load the packages we need - all of which are suggested for or imported to *psm3mkv*. With thanks again to @vbaliga for [this helpful code](https://vbaliga.github.io/posts/2019-04-28-verify-that-r-packages-are-installed-and-loaded/)).
@@ -135,7 +138,7 @@ mort <- HMDHFDplus::readHMDweb(CNTRY="GBRTENW",
135
138
mort <- dplyr::add_row(mort, Age=111, lx=0, Timey=60)
136
139
```
137
140
138
-
You will see that the above code cannot run without a login for the Human Mortality Database(www.mortality.org). Alternatively, we could just make up a mortality table.
141
+
You will see that the above code cannot run without a login for the [Human Mortality Database](www.mortality.org). Alternatively, we could just make up a mortality table.
139
142
140
143
```{r ltable2}
141
144
mort <- tibble::tibble(
@@ -253,6 +256,8 @@ res3 |> dplyr::mutate(
253
256
254
257
The estimate of mean time alive has reduced by `r round(res1$os[3]-res3$os[3],1)` weeks for example, from `r round(res1$os[3],1)` originally to `r round(res3$os[3],1)` weeks now.
255
258
259
+
### Comparing the results
260
+
256
261
A summary of the STM-CR estimates of mean time in PF is given in the table below.
257
262
258
263
|Model | Mean time in PF (weeks) | Change (weeks) | Mean time alive (weeks) | Change (weeks) |
@@ -261,6 +266,8 @@ A summary of the STM-CR estimates of mean time in PF is given in the table below
In this fictional case, the application of a lifetable constraint had fairly sizeable effects on the results - although this was by design of this demonstration. The vignette focussed on the STM-CR model, although other model structures were fitted and estimated also. The package also allows application of discounting through the `discrate` optional call to `calc_allrnds()`.
270
+
264
271
## References
265
272
266
273
1. Muston D. Informing structural assumptions for three state oncology cost-effectiveness models through model efficiency and fit. In review.
0 commit comments