Skip to content

Commit 9c87753

Browse files
committed
2 parents bda0eaf + c6522f6 commit 9c87753

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

DESCRIPTION

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ Authors@R: c(
77
person("Zhaojing", "Che", , "blendr-pkg@proton.me", role = c("aut", "cph", "cre"),
88
comment = c(ORCID = "0000-0003-2245-1606", ROR = "052gg0110"))
99
)
10-
Description: Create blended survival curves, see 'Che et al.' (2022) <doi:10.1177/0272989X221134545>.
10+
Description: Create a blended curve from two survival curves, which is particularly useful
11+
for survival extrapolation in health technology assessment. The main idea is to
12+
mix a flexible model that fits the observed data well with a parametric model that
13+
encodes assumptions about long-term survival. The two curves are blended into a
14+
single survival curve that is identical to the first model over the range of
15+
observed times and gradually approaches the parametric model over the extrapolation
16+
period based on a given weight function. This approach allows for the inclusion of
17+
external information, such as data from registries or expert opinion, to guide
18+
long-term extrapolations, especially when dealing with immature trial data.
19+
See Che et al. (2022) <doi:10.1177/0272989X221134545>.
1120
License: GPL (>= 3)
1221
Additional_repositories: https://giabaio.r-universe.dev, https://inla.r-inla-download.org/R/stable
1322
Encoding: UTF-8

R/fit_inla_pw.R

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
#' @export
1313
#'
1414
#' @examples
15-
#' \dontrun{
16-
#' data("TA174_FCR", package = "blendR")
17-
#' head(dat_FCR)
18-
#'
19-
#' obs_Surv <- fit_inla_pw(data = dat_FCR, cutpoints = seq(0, 180, by = 5))
15+
#' \donttest{
16+
#' if (requireNamespace("INLA", quietly = TRUE)) {
17+
#' data("TA174_FCR", package = "blendR")
18+
#' head(dat_FCR)
19+
#' obs_Surv <- fit_inla_pw(data = dat_FCR, cutpoints = seq(0, 180, by = 5))
20+
#' }
2021
#' }
2122
#'
2223
fit_inla_pw <- function(inla.formula = inla.surv(death_t, death) ~ -1,
@@ -28,7 +29,8 @@ fit_inla_pw <- function(inla.formula = inla.surv(death_t, death) ~ -1,
2829
stop(
2930
"The 'INLA' package is required to use this function. ",
3031
"Please install it from its repository by running: ",
31-
"install.packages('INLA', repos = c(getOption('repos'), INLA = 'https://inla.r-inla-download.org/R/stable'), dep = TRUE)"
32+
"install.packages('INLA', repos = c(getOption('repos'),
33+
INLA = 'https://inla.r-inla-download.org/R/stable'), dep = TRUE)"
3234
)
3335
}
3436

0 commit comments

Comments
 (0)