create_integration_matrix_agetime_lag: Create Matrix to Estimate Lagged Cumulative Hazard Rate

View source: R/model_prep.R

create_integration_matrix_agetime_lagR Documentation

Create Matrix to Estimate Lagged Cumulative Hazard Rate

Description

Create a matrix to estimate the lagged cumulative hazard rate needed for survival analysis by age and time. The option to include an additional stratification variable is also available, creating a 3D hazard function.

Usage

create_integration_matrix_agetime_lag(
  dat,
  subset = NULL,
  time1 = "time1",
  time2 = "time2",
  timecaps = c(1, Inf),
  Ntime = NULL,
  age = "age",
  Nage = NULL,
  strat = NULL,
  Nstrat = NULL
)

Arguments

time1

Variable name for time of birth, Default: "time1"

time2

Variable name for time circumcised or censored, Default: "time2"

age
  • Variable with age circumcised or censored. Default: "age"

strat

Variable to stratify by in using a 3D hazard function, Default: NULL

Value

Matrix for selecting instantaneous hazard rate.

See Also

sparseMatrix


mrc-ide/threemc documentation built on Feb. 9, 2024, 5:16 p.m.