R
package for performing continuous-time weight1 estimation based on Aalens additive hazard model. The weights, and weighted additive hazard regressions are consistent2. Moreover, (weighted) additive hazard estimates can be transformed for estimating other parameters consistently3, paving the way for causal survival analysis.
Make sure to have the following libraries installed:
timereg
data.table
It is an advantage to be familiar with timereg::aalen
Make sure to have the devtools
package installed. Then run
devtools::install_github("palryalen/ahw").
You can also download the source from this page and build the package manually.
library(ahw)
example(makeContWeights)
We use SemVer for versioning.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) licence. You are therefore free to
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material
1: Kjetil Røysland, A martingale approach to continuous-time marginal structural models, Bernoulli
2: Pål Ryalen, Mats Stensrud, Kjetil Røysland, The additive hazard estimator is consistent for continuous time marginal structural models
3: Pål Ryalen, Mats Stensrud, Kjetil Røysland, Transforming cumulative hazard estimates
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.