TwoTimeScales1.0.0 package

Analysis of Event Data with Two Time Scales

covariates_plot

Plot of the covariates' effects

cumhaz2ts

Cumulative hazard over two time scales

cuminc2ts

Cumulative incidence surface over two time scales

exposures_events_1d

Bin data on one time scale

exposures_events_2d

Bin data on two time scales

exposures_events_Lexis

Bin data on the Lexis diagram

fit1ts

Fit a smooth hazard model with one time scale

fit1tsmodel_ucminf

Numerical optimization of the 1ts model

fit2ts

Fit a smooth hazard model with two time scales

fit2tsmodel_ucminf

Numerical optimization of the 2ts model

get_aic_fit_1d

Return the AIC of 1ts model

get_aic_fit_2d

Return the AIC of 2ts model

get_bic_fit_1d

Return the BIC of 1ts model

get_bic_fit_2d

Return the BIC of 2ts model

get_hazard_1d_LMM

Get estimated (log-)hazard values with 1 time scale

get_hazard_1d

Get estimated (log-)hazard values with 1 time scale

get_hazard_2d_LMM

Get estimated (log-)hazard surface with 2 time scales

get_hazard_2d

Get estimated (log-)hazard surface with 2 time scales

get_hr

Get the Hazard Ratios with their Standard Errors

getAIC_BIC_LMM

Calculates AIC and BIC from object fitted via LMMsolver

GLAM_1d_covariates

Fit the 1d GLAM with covariates

GLAM_2d_covariates

Fit the 2d GLAM with covariates

GLAM_2d_no_covariates

Fit the 2d GLAM without covariates

grid_search_1d

Grid search for the optimal 1ts model

grid_search_2d

Grid search for the optimal 2ts model

haz2ts_summary

Summary function for object of class 'haz2ts'

haz2tsLMM_summary

Summary function for object of class 'haz2tsLMM'

imageplot_2ts

Image Plot of 2ts hazard

imageplot_SE

Image Plot of Standard Errors for the 2ts hazard

iwls_1d

Iterative Weighted Least Squares algorithm for 1ts model

make_bins

Construct bins over one or more time axes

plot_slices

Plot slices of the (log-) hazard

plot.haz1ts

Plot method for a haz1ts object.

plot.haz1tsLMM

Plot method for a haz1ts object.

plot.haz2ts

Plot method for a haz2ts object.

plot.haz2tsLMM

Plot method for a haz2tsLMM object.

prepare_data_LMMsolver

Process data to fit model with LMMsolver

prepare_data

Prepare raw data by binning them in 1d or 2d

print.data2ts

Print method for a data2ts object

surv2ts

Survival function with two time scales

Analyse time to event data with two time scales by estimating 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. Extension to a competing risks model are implemented. For details about the method please refer to Carollo et al. (2024) <doi:10.1002/sim.10297>.

  • Maintainer: Angela Carollo
  • License: GPL-3
  • Last published: 2024-12-23