Description Usage Arguments Value
This helper function takes in a vector of event times, and generates a matrix having each row showing the time accrued within each interval between consecutive elements of a vector of knots.
1 | pw_cum_mat(y, knots, intercept = TRUE)
|
y |
vector of event times. |
knots |
increasing vector of cutpoints. If it does not start with 0, one will be appended to the start. However, it should not include Inf at the end. |
intercept |
if true, includes column corresponding with 'first' interval, and if false does not. It makes sense to include an intercept if the time-varying covariate is not also included in the "baseline", otherwise, there would be an identifiability issue. |
a numeric matrix with, with (number of nonzero knots + 1) columns, and with rows corresponding to elements of y.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.