Description Usage Arguments Value Author(s) See Also Examples
Gets person year (PY) contributions to a particular time since diagnosis (tsd) interval from survival times.
1 | getPY(surv, bin, binS, brks)
|
surv |
The total survival time of the patient. |
bin |
The label of the specific bin of interest. |
binS |
The character vector of bin labels in which binLab exists. |
brks |
The numeric vector of break points used by cut to create binS. |
A vector as long as the survival vector input of PY at risk in a particular interval.
Tom Radivoyevitch (radivot@ccf.org)
1 2 3 4 5 6 7 | library(SEERaBomb)
brks=c(0,0.25,1,3,6)
(binS=levels(cut(brks+0.1,breaks=c(brks,100)))) #make a vector of intervals
survTimes=c(8,16,1.5,3.7)
getPY(survTimes,binS[1],binS,brks)# all contribute 0.25 to first interval
getPY(survTimes,binS[4],binS,brks)# 3rd and 4th survivals contribute 0 and 0.7 to (3,6]
getPY(survTimes,binS[5],binS,brks)# 1st and 2nd survival contribute 2 and 10 years to (6,100]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.