pytable: Make person-year table from individual data
Description
This function creates the person-years table from event, time and covariate data. The number of event and time of some observations with the same covariate data are summed up, and made into one observation.
Usage
pytable(event, time, cov, scale = 1)
Arguments
event
a vector specifying number of event.
time
a vector specifying time variable.
cov
vector or matrix or data.frame of covariates.
scale
a scaling for person-year. The value of 365.25 will make person-year table from time variable recoded as days.