pw_cum_mat: Generate Piecewise Constant Cumulative Hazard Matrix

View source: R/piecewise_functions.R

pw_cum_matR Documentation

Generate Piecewise Constant Cumulative Hazard Matrix

Description

This helper function takes in a vector of event times, and generates a matrix dividing each time into a vector giving the time accrued within each interval between consecutive elements of a vector of knots.

Usage

pw_cum_mat(y, knots)

Arguments

y

vector of event times.

knots

increasing vector of cutpoints

Value

a numeric matrix, with rows corresponding to elements of y.


hreed7/SemiCompRisksPen documentation built on Dec. 15, 2024, 5:41 p.m.