tsd: Compute RR vs tsd

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/tsd.R

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. WARNING: Use of this function is deprecated, please use csd() instead.

Usage

1
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 extended 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.

Note

This function was developed with support from the Cleveland Clinic Foundation.

Author(s)

Tom Radivoyevitch (radivot@ccf.org)

See Also

SEERaBomb-package, mk2D,seerSet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
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)

## End(Not run)

SEERaBomb documentation built on Dec. 16, 2019, 1:21 a.m.