get_cox_risk_set_idx: Identify the risk set indices for Cox proportional hazards...

get_cox_risk_set_idxR Documentation

Identify the risk set indices for Cox proportional hazards model

Description

This function returns the indices of the risk set for a given time of interest in the Cox proportional hazards model.

Usage

get_cox_risk_set_idx(
  time_of_interest,
  entry_vector,
  time_vector,
  status_vector
)

Arguments

time_of_interest

A numeric value representing the time at which the risk set is calculated.

entry_vector

A numeric vector representing the entry times of subjects.

time_vector

A numeric vector representing the time-to-event or censoring times of subjects.

status_vector

A numeric vector indicating event occurrence (1) or censoring (0) for each subject.

Value

A vector of indices representing the subjects at risk at the specified time of interest.


catalytic documentation built on April 4, 2025, 5:51 a.m.