Package: TwoTimeScales 1.0.0

TwoTimeScales: Analysis of Event Data with Two Time Scales

Tools for the analysis of time to event data with two time scales. The main goal of the analysis is to estimate a smooth hazard that varies over two time scales and also, if covariates are available, to estimate a proportional hazards model with such a two-dimensional baseline hazard. Functions are provided to prepare the raw data for estimation, to estimate and to plot the two-dimensional smooth hazard. Additionally, the cumulative incidence functions over two time scales can be estimated in a competing risks model. For details about the method please refer to Carollo et al. (2024) <doi:10.1002/sim.10297>.

Authors:Angela Carollo [aut, cre, cph], Paul H.C. Eilers [aut], Jutta Gampe [aut]

TwoTimeScales_1.0.0.tar.gz
TwoTimeScales_1.0.0.zip(r-4.5)TwoTimeScales_1.0.0.zip(r-4.4)TwoTimeScales_1.0.0.zip(r-4.3)
TwoTimeScales_1.0.0.tgz(r-4.4-any)TwoTimeScales_1.0.0.tgz(r-4.3-any)
TwoTimeScales_1.0.0.tar.gz(r-4.5-noble)TwoTimeScales_1.0.0.tar.gz(r-4.4-noble)
TwoTimeScales_1.0.0.tgz(r-4.4-emscripten)TwoTimeScales_1.0.0.tgz(r-4.3-emscripten)
TwoTimeScales.pdf |TwoTimeScales.html
TwoTimeScales/json (API)
NEWS

# Install 'TwoTimeScales' in R:
install.packages('TwoTimeScales', repos = c('https://angelacar.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/angelacar/twotimescales/issues

Pkgdown:https://angelacar.github.io

Datasets:
  • reccolon2ts - Data from the chemotherapy for stace B/C colon cancer study

On CRAN:

6.21 score 9 stars 5 scripts 18 exports 85 dependencies

Last updated 6 days agofrom:50d4991f1c. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKDec 24 2024
R-4.5-winOKDec 24 2024
R-4.5-linuxOKDec 24 2024
R-4.4-winOKDec 24 2024
R-4.4-macOKDec 24 2024
R-4.3-winOKDec 24 2024
R-4.3-macOKDec 24 2024

Exports:covariates_plotcumhaz2tscuminc2tsexposures_events_1dexposures_events_2dexposures_events_Lexisfit1tsfit2tsget_hazard_1dget_hazard_1d_LMMget_hazard_2dget_hazard_2d_LMMget_hrhaz2ts_summaryhaz2tsLMM_summarymake_binsprepare_datasurv2ts

Dependencies:agridatashbitopsbootclassclassIntcliclustercmprskcolorspacedata.tableDBIdotCall64dplyre1071EpietmfansifarverfdsfieldsFNNgenericsggplot2gluegridExtragtablehdrcdeisobandJOPSkernlabKernSmoothkslabelinglatticelifecycleLMMsolverlocfitmagrittrmapsMASSMatrixmclustmgcvmulticoolmunsellmvtnormnlmenumDerivpcaPPpillarpkgconfigplyrpopEpipracmaproxyR6rainbowRColorBrewerRcppRcppArmadilloRCurlreshape2rlangrparts2scalesSemiParsfspamSpATSstringistringrsurvivaltibbletidyselectucminfunitsutf8vctrsviridisviridisLitewithrwkzoo

Introduction to TwoTimeScales

Rendered fromTwoTimeScales.Rmdusingknitr::rmarkdownon Dec 24 2024.

Last update: 2024-12-18
Started: 2024-04-25

Smooth hazards with one time scale

Rendered fromonetime.Rmdusingknitr::rmarkdownon Dec 24 2024.

Last update: 2024-12-18
Started: 2024-04-25

Smooth hazards with two time scales

Rendered fromtwotimes.Rmdusingknitr::rmarkdownon Dec 24 2024.

Last update: 2024-12-18
Started: 2024-04-25

Visualize hazards with two time scales

Rendered fromvisualization.Rmdusingknitr::rmarkdownon Dec 24 2024.

Last update: 2024-12-18
Started: 2024-04-25

Readme and manuals

Help Manual

Help pageTopics
Plot of the covariates' effectscovariates_plot
Cumulative hazard over two time scalescumhaz2ts
Cumulative incidence surface over two time scalescuminc2ts
Bin data on one time scaleexposures_events_1d
Bin data on two time scalesexposures_events_2d
Bin data on the Lexis diagramexposures_events_Lexis
Fit a smooth hazard model with one time scalefit1ts
Numerical optimization of the 1ts modelfit1tsmodel_ucminf
Fit a smooth hazard model with two time scalesfit2ts
Numerical optimization of the 2ts modelfit2tsmodel_ucminf
Return the AIC of 1ts modelget_aic_fit_1d
Return the AIC of 2ts modelget_aic_fit_2d
Return the BIC of 1ts modelget_bic_fit_1d
Return the BIC of 2ts modelget_bic_fit_2d
Get estimated (log-)hazard values with 1 time scaleget_hazard_1d
Get estimated (log-)hazard values with 1 time scaleget_hazard_1d_LMM
Get estimated (log-)hazard surface with 2 time scalesget_hazard_2d
Get estimated (log-)hazard surface with 2 time scalesget_hazard_2d_LMM
Get the Hazard Ratios with their Standard Errorsget_hr
Calculates AIC and BIC from object fitted via LMMsolvergetAIC_BIC_LMM
Fit the 1d GLAM with covariatesGLAM_1d_covariates
Fit the 2d GLAM with covariatesGLAM_2d_covariates
Fit the 2d GLAM without covariatesGLAM_2d_no_covariates
Grid search for the optimal 1ts modelgrid_search_1d
Grid search for the optimal 2ts modelgrid_search_2d
Summary function for object of class 'haz2ts'haz2ts_summary
Summary function for object of class 'haz2tsLMM'haz2tsLMM_summary
Image Plot of 2ts hazardimageplot_2ts
Image Plot of Standard Errors for the 2ts hazardimageplot_SE
Iterative Weighted Least Squares algorithm for 1ts modeliwls_1d
Construct bins over one or more time axesmake_bins
Plot slices of the (log-) hazardplot_slices
Plot method for a haz1ts object.plot.haz1ts
Plot method for a haz1ts object.plot.haz1tsLMM
Plot method for a haz2ts object.plot.haz2ts
Plot method for a haz2tsLMM object.plot.haz2tsLMM
Prepare raw data by binning them in 1d or 2dprepare_data
Process data to fit model with LMMsolverprepare_data_LMMsolver
Print method for a 'data2ts' objectprint.data2ts
Data from the chemotherapy for stace B/C colon cancer studyreccolon2ts
Survival function with two time scalessurv2ts