/TwoTimeScales

Analysis of event data with two time scales

Primary LanguageRGNU General Public License v3.0GPL-3.0

TwoTimeScales

TwoTimeScales provides a collection of functions for the analysis of time to event data with two time scales.

The main goal of the analysis is to estimate a smooth two dimensional hazard curve, while also respecting the constraint imposed by the relation between the two time scales. Analyses are based on the P-splines model of Poisson data with offset. Regression model to study the effect of covariates on the baseline hazard are possible in a proportional hazards fashion. Functions to plot the (baseline) hazard are also provided.

Installation

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

# install.packages("devtools")
devtools::install_github("AngelaCar/TwoTimeScales")

Vignettes need to be explicitly requested. To install a version of the package including the vignettes, please run:

devtools::install_github("AngelaCar/TwoTimeScales",
                          dependencies = TRUE, build_vignettes = TRUE)

Note: This will take more time than installing the version of the package without vignettes.

How to use TwoTimeScales

A general introduction to the functionalities of the package is given in:

vignette("TwoTimeScales")

Further examples on can be found in the vignettes.

vignette("onetime")
vignette("twotimes")
vignette("visualization")

Or read them in the package website.