Skip to content

Latest commit

 

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

contICEIPCW

R-CMD-check

The goal of contICEIPCW is to provide an implementation of the ICE-IPCW algorithm for longitudinal causal inference in continuous-time with targeted learning for time-to-event outcomes.

Installation

You can install the development version of contICEIPCW from GitHub with:

devtools::install_github("jsohlendorff/contICEIPCW")

Example

library(contICEIPCW)
#> Loading required package: data.table
set.seed(15)
data_continuous <- simulate_continuous_time_data(
  n = 1000,
  uncensored = FALSE,
  no_competing_events = FALSE,
  baseline_rate_list = list(
    A = 0.005,
    L = 0.001,
    C = 0.0008,
    Y = 0.0001,
    D = 0.00015
  )
)
library(contICEIPCW)
set.seed(15)
data_continuous <- simulate_continuous_time_data(
  n = 1000,
  uncensored = FALSE,
  no_competing_events = FALSE,
  baseline_rate_list = list(
    A = 0.005,
    L = 0.001,
    C = 0.0008,
    Y = 0.0001,
    D = 0.00015
  )
)
prep_data <- prepare_data(
  data = data_continuous,
  time_horizons = 720,
  time_covariates = c("A", "L"),
  baseline_covariates = c("age", "A_0", "L_0"),
  marginal_censoring = TRUE
)
propensity_score_data <- propensity_scores(
  prepared_data = prep_data,
  model_treatment = "learn_glm_logistic",
  model_hazard = "learn_coxph"
)
result <- debias_ice_ipcw(
  prepared_data = propensity_score_data,
  model_pseudo_outcome = "oipcw_expit",
  model_hazard = "learn_coxph",
  conservative = TRUE
)

Roadmap

The R package implements the following:

  • ICE-IPCW algorithm and ICE-IPCW with one-step update across multiple time horizons
  • Custom model choice for propensity score and (non-marginal) censoring
  • Fast C++ implementation of OIPCW

The following features need further testing:

  • TMLE update without censoring martingale
  • Inference with censoring martingale

The following features are not implemented:

  • Sample-splitting/cross-fitting
  • Penalization/regularization with option "OIPCW" for iterative regressions
  • Non-marginal censoring with censoring martingale
  • Marginal censoring with anything other than coxph
  • Strata for use with coxph for censoring
  • TMLE update with censoring martingale (don't know how to do this yet)
  • Dynamic and stochastic interventions

About

contICEIPCW R package

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages