survival_data {glmmPen} | R Documentation |
Convert Input Survival Data Into Long-Form Data Needed for Fitting a Piecewise Exponential Model
Description
Converts the input survival data with one row or element corresponding to a
single observation or subject into a long-form dataset where one observation or subject
contributes j
rows, where j
is the number of time intervals that
a subject survived at least part-way through.
Usage
survival_data(y, X, Z, group, offset_fit = NULL, survival_options)
Arguments
y |
response, which must be a |
X |
matrix of fixed effects covariates |
Z |
matrix of random effects covariates |
group |
vector specifying the group assignment for each subject |
offset_fit |
vector specifying the offset.
This can be used to specify an a priori known component to be included in the
linear predictor during fitting. Default set to |
survival_options |
a structure of class "survivalControl" created
from function |