Learn R Programming

SEERaBomb (version 2015.2)

post1PYO: 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 a defined time since exposure interval and after a defined first cancer therapy.

Usage

post1PYO(canc, brks=c(0,2,5),binIndx=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.
brks
A vector of break points in years used to form time since diagnosis bins.
binIndx
The index of the 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

  • A list where the first element is a list LPYM with as many PY matrices (PYM) as cancers in canc. The second 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. The third element is a trivial scalar, the py-weighted midpoint of the time interval selected.

See Also

SEERaBomb-package, getE,seerSet