Learn R Programming

SEERaBomb (version 2015.2)

tsd: Compute RR vs tsd

Description

Computes relative risks (RR) over specified times since diagnoses (tsd) of a 1st cancer. 2D spline fits are used to produce expected cases E controlling for background risk dedepence on age and calendar year. RR is then O/E where O is the number of observed cases.

Usage

tsd(seerSet,brks,trts=NULL,PYLong=FALSE,firstS="all")

Arguments

seerSet
A seerSet object produced by mk2D().
brks
Vector of breaks in years used to form tsd intervals/bins.
trts
Character vector of treatments of interest. Default of NULL => all levels in seerSet's canc$trt.
PYLong
Set true if in addition to O and E for each tsd interval you also want PY strips for each individual; having these big dataframes slows saving seerSets, so only fetch if needed.
firstS
Character vector of first cancers of interest. Default of "all" sets it to the vector of all cancers in the seerSet field cancerS, which is created when the object is first created by seerSet().

Value

  • The input with an L component added to it or extends it if it already existed. Each component of L is a nested list of lists that can yield second cancer relative risks as a function of time since diagnosis and different first cancers and if they were irradiated or not.

See Also

SEERaBomb-package, mk2D,seerSet

Examples

Run this code
library(SEERaBomb)
pm=simSeerSet()
pm=mk2D(pm) 
mybrks=c(0,1,5,10)
pm=tsd(pm,brks=mybrks,trts=c("noRad","rad"),PYM=TRUE)
(lab=paste0("b",paste(mybrks,collapse="_")))
LM=pm$L[[lab]]$'rad'
names(LM)
LM$PyM
LM$Obs
LM$Exp
table(LM$PyM$`(0,1]`$cancer2)
table(LM$PyM$`(1,5]`$cancer2)
table(LM$PyM$`(5,10]`$cancer2)

Run the code above in your browser using DataLab