Description Usage Arguments Value Examples
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.
1 |
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. |
a person-year data.frame
1 2 3 4 5 |
event py cov1 cov2
1 2 7 1 1
2 1 9 2 0
3 0 2 2 1
4 1 3 3 0
5 1 6 3 1
6 2 12 4 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.