Skip to content

Commit

Permalink
feat: temporary remove TMLE methods to make CRAN happy
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDenz1 committed Apr 10, 2024
1 parent 0f39f2a commit a439ed9
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 653 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: adjustedCurves
Title: Confounder-Adjusted Survival Curves and Cumulative Incidence
Functions
Version: 0.11.0.9000
Version: 0.11.1
Authors@R:
person("Robin", "Denz", , "robin.denz@rub.de", role = c("aut", "cre"))
Maintainer: Robin Denz <robin.denz@rub.de>
Expand Down Expand Up @@ -51,7 +51,6 @@ Suggests:
vdiffr (>= 1.0.7),
covr,
data.table,
concrete (>= 1.0.5),
numDeriv,
cowplot (>= 1.1.3)
VignetteBuilder:
Expand Down
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export(cif_direct_pseudo)
export(cif_iptw)
export(cif_iptw_pseudo)
export(cif_matching)
export(cif_tmle)
export(plot_curve_diff)
export(plot_curve_ratio)
export(plot_rmst_curve)
Expand All @@ -55,7 +54,6 @@ export(surv_prox_iptw)
export(surv_strat_amato)
export(surv_strat_cupples)
export(surv_strat_nieto)
export(surv_tmle)
importFrom(doRNG,"%dorng%")
importFrom(dplyr,"%>%")
importFrom(foreach,"%dopar%")
Expand Down
22 changes: 18 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,26 @@ Documentation

# adjustedCurves 0.11.1

* Added the `difference` and `ratio` arguments to `plot_rmst_curve()` and `plot_rmtl_curve()`
* Added the `difference` and `ratio` functionality to the `adjusted_surv_quantile()` function
Enhancements

* Re-factored internal code to vastly increase speed of bootstrapping related computations
* Added risk table functionality for `plot.adjustedsurv()`

New features

* Added risk table functionality for `plot.adjustedsurv()` (all arguments starting with `risk_table`)
* Allow estimation of difference and ratios in `plot_rmst_curve()` function
* Allow estimation of difference and ratios in `plot_rmtl_curve()` function
* Allow estimation of difference and ratios in `adjusted_surv_quantile()` function

Refactored

* Re-factored examples to only be executed if suggested packages are installed
* Renamed `adjsurv` and `adjcif` output objects of `adjustedsurv()` and `adjsutedcif()` respectively to `adj`
* Put functionality of `difference` and `ratio` arguments into one `contrast` argument in `adjusted_rmst()`, `adjusted_rmtl()`, `adjusted_surv_quantile()`, `plot_rmst_curve()` and `plot_rmtl_curve()` functions
* Temporarily removed support for `tmle` in `adjustedsurv()` and `adjustedcif()` due to `concrete` being removed from CRAN

Documentation

* Re-worked introduction vignette
* Added FAQ vignette
* Added Group Comparison vignette
* Re-factored examples to only be executed if suggested packages are installed
4 changes: 2 additions & 2 deletions R/helper_functions.r
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ load_needed_packages <- function(method, kind, treatment_model,

# concrete
if (method=="tmle") {
requireNamespace("concrete")
#requireNamespace("concrete")
}

# data.table
Expand Down Expand Up @@ -428,7 +428,7 @@ load_needed_packages <- function(method, kind, treatment_model,

# concrete
if (method=="tmle") {
requireNamespace("concrete")
#requireNamespace("concrete")
}

# data.table
Expand Down
168 changes: 0 additions & 168 deletions R/method_tmle.r

This file was deleted.

48 changes: 24 additions & 24 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/RobinDenz1/adjustedCurves",
"issueTracker": "https://github.com/RobinDenz1/adjustedCurves/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.11.0",
"version": "0.11.1",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -229,24 +229,11 @@
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "survival",
"name": "survival",
"version": ">= 3.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=survival"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"version": ">= 3.0.0",
"version": ">= 3.2.1",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -284,7 +271,7 @@
"@type": "SoftwareApplication",
"identifier": "vdiffr",
"name": "vdiffr",
"version": ">= 1.0.0",
"version": ">= 1.0.7",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -319,28 +306,28 @@
},
{
"@type": "SoftwareApplication",
"identifier": "concrete",
"name": "concrete",
"version": ">= 1.0.5",
"identifier": "numDeriv",
"name": "numDeriv",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=concrete"
"sameAs": "https://CRAN.R-project.org/package=numDeriv"
},
{
"@type": "SoftwareApplication",
"identifier": "numDeriv",
"name": "numDeriv",
"identifier": "cowplot",
"name": "cowplot",
"version": ">= 1.1.3",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=numDeriv"
"sameAs": "https://CRAN.R-project.org/package=cowplot"
}
],
"softwareRequirements": {
Expand Down Expand Up @@ -417,9 +404,22 @@
},
"sameAs": "https://CRAN.R-project.org/package=rlang"
},
"7": {
"@type": "SoftwareApplication",
"identifier": "survival",
"name": "survival",
"version": ">= 3.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=survival"
},
"SystemRequirements": null
},
"fileSize": "2694.877KB",
"fileSize": "3158.658KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
4 changes: 2 additions & 2 deletions man/adjustedCurves.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ where \eqn{T_z} is the survival time that would have been observed if treatment

\strong{\emph{What features are included in this package?}}

This package includes 16 methods to estimate confounder-adjusted survival curves (single event) and 8 methods to estimate confounder adjusted cumulative incidence functions (possibly with multiple competing events). It provides \code{plot} functions to easily produce highly customizable and publication-ready graphics. It also allows the user to easily calculate relevant statistics, such as confidence intervals, p-values, and adjusted restricted mean survival time estimates. Multiple Imputation is directly supported.
This package includes 15 methods to estimate confounder-adjusted survival curves (single event) and 7 methods to estimate confounder adjusted cumulative incidence functions (possibly with multiple competing events). It provides \code{plot} functions to easily produce highly customizable and publication-ready graphics. It also allows the user to easily calculate relevant statistics, such as confidence intervals, p-values, and adjusted restricted mean survival time estimates. Multiple Imputation is directly supported.

\strong{\emph{What does a typical workflow using this package look like?}}

Expand All @@ -34,7 +34,7 @@ When competing risks are present, the cause-specific confounder-adjusted surviva

\strong{\emph{What features are missing from this package?}}

In a former version, this package included two targeted maximum likelihood based methods for the estimation of adjusted survival curves and one for the estimation of adjusted cumulative incidence functions based on discrete-time data. These methods have been removed because the \pkg{survtmle} package has been removed from CRAN and there is currently no other available implementation of these estimators on CRAN. However, since version 0.10.2 this package contains an implementation of targeted maximum likelihood estimation for continuous time-to-event data (a wrapper function for the \pkg{concrete} package).
In a former version, this package included two targeted maximum likelihood based methods for the estimation of adjusted survival curves and one for the estimation of adjusted cumulative incidence functions based on discrete-time data. These methods have been removed because the \pkg{survtmle} package has been removed from CRAN and there is currently no other available implementation of these estimators on CRAN. From version 0.10.2 tp 0.11.0 this package then contained an implementation of targeted maximum likelihood estimation for continuous time-to-event data (a wrapper function for the \pkg{concrete} package). This is currently unavailable due to the package being removed from CRAN, but will probably be supported again soon.

This package also currently does not support time-varying treatments or covariates. It also does not support left-censoring, interval-censoring or left-truncation. These features may be added in future releases.

Expand Down
2 changes: 1 addition & 1 deletion man/adjusted_surv_quantile.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ If more than two groups are present in \code{variable}, all other comparisons ex

\strong{\emph{Multiple Imputation}}

If multiple imputation was used in the original function call, the survival time quantiles are read off the final pooled survival curves directly. This also works when using \code{contrast="diff"} or \code{contrast="ratio"}. When using either \code{contrast="diff"} or \code{contrast="ratio"} in conunction with \code{conf_int=TRUE} (plus bootstrapping), the standard errors of the difference or ratio are estimated for each imputed dataset separately and pooled using Rubins Rule afterwards. The pooled standard errors are then used to perform the same calculations as described above.
If multiple imputation was used in the original function call, the survival time quantiles are read off the final pooled survival curves directly. This also works when using \code{contrast="diff"} or \code{contrast="ratio"}. When using either \code{contrast="diff"} or \code{contrast="ratio"} in conjunction with \code{conf_int=TRUE} (plus bootstrapping), the standard errors of the difference or ratio are estimated for each imputed dataset separately and pooled using Rubins Rule afterwards. The pooled standard errors are then used to perform the same calculations as described above.

}
\value{
Expand Down
1 change: 0 additions & 1 deletion man/adjustedcif.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ The primary purpose of the \code{adjustedcif} function is to provide a convenien
\item{"\link[=cif_matching]{matching}": Using Propensity Score Matching to estimate the adjusted CIFs.}
\item{"\link[=cif_aiptw]{aiptw}": An Augmented Inverse Probability of Treatment Weighting estimator.}
\item{"\link[=cif_aiptw_pseudo]{aiptw_pseudo}": An Augmented Inverse Probability of Treatment Weighting estimator using Pseudo-Values.}
\item{"\link[=cif_tmle]{tmle}": Targeted Maximum Likelihood Estimation for continuous time time-to-event data with competing events.}
\item{"\link[=cif_aalen_johansen]{aalen_johansen}": A simple stratified Aalen-Johansen estimator without any form of adjustment.}
}

Expand Down
1 change: 0 additions & 1 deletion man/adjustedsurv.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ The primary purpose of the \code{adjustedsurv} function is to provide a convenie
\item{"\link[=surv_emp_lik]{emp_lik}": An Empirical Likelihood based estimator.}
\item{"\link[=surv_aiptw]{aiptw}": An Augmented Inverse Probability of Treatment Weighting estimator.}
\item{"\link[=surv_aiptw_pseudo]{aiptw_pseudo}": An Augmented Inverse Probability of Treatment Weighting estimator using Pseudo-Values.}
\item{"\link[=surv_tmle]{tmle}": Targeted Maximum Likelihood Estimation for continuously distributed time-to-event data.}
\item{"\link[=surv_strat_amato]{strat_amato}": A method based on stratification and weighting by Amato (1988).}
\item{"\link[=surv_strat_nieto]{strat_nieto}": A method based on stratification and weighting by Gregory (1988) and Nieto & Coresh (1996).}
\item{"\link[=surv_strat_cupples]{strat_cupples}": A method based on stratification and weighting by Cupples et al. (1995).}
Expand Down
Loading

0 comments on commit a439ed9

Please sign in to comment.