Learn R Programming

SEERaBomb (version 2016.1)

post1PYOc: Get person-years at risk and observed cases after first cancers

Description

Converts a canc data.frame into a list of objects containing information regarding person years at risk for a second cancer after having a first cancer, and the number observed, in defined intervals of time since diagnosis, calendar year, and age at diagnosis.

Usage

post1PYOc(canc, brkst=c(0),binIndxt=1,brksy=c(1973),binIndxy=1,brksa=c(0),binIndxa=1, Trt="rad",PYLong=FALSE,yearEnd,firstS,secondS)

Arguments

canc
Input canc data.frame that is already sex, and possibly race, specific, but not cancer specific, as treatment of any first cancer could potentially cause any second cancer.
brkst
Vector of breaks in years used to form tsd intervals/bins. An upper limit of 100, well beyond 40 years of SEER follow up currently available, is assumed/added to brkst internally, and should thus not be in brkst.
binIndxt
The index of the tsd interval for which py are to be computed by calling this function.
brksy
Vector of breaks used to form groups of calendar year at diagnosis intervals/bins. An upper limit of yearEnd (last year in SEER; a seerSet field) is assumed/added to brksy internally.
binIndxy
The index of the year interval for which py are to be computed by calling this function.
brksa
Vector of breaks used to form groups of age at diagnosis intervals/bins. An upper limit of 126 is assumed.
binIndxa
The index of the age at DX interval for which py are to be computed by calling this function.
Trt
The treatment for the first cancers. Note that the second cancer treatment is irrelevant here, so the input canc must not be reduced to only certain treatment types.
PYLong
PYLong of tsd.
yearEnd
This is taken from the seerSet object.
firstS
Vector of first cancers of interest as strings.
secondS
Vector of second cancers of interest as strings.

Value

element is a matrix of cases observed in this interval after this treatment, where row names are first cancers and column names are second cancers. And after a few other slots, the last element is a trivial scalar, the py-weighted midpoint of the time interval selected.

See Also

SEERaBomb-package, getE,seerSet