Skip to content

jsohlendorff/contICEIPCW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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
)

About

contICEIPCW R package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors