mk2D: Make 2D-spline fits of incidences

Description Usage Arguments Value Author(s) See Also Examples

View source: R/mk2D.R

Description

Produces two dimensional (2D) spline fits of cancer incidence versus age and calendar year, with interactions. In conjunction with person years (PY) at risk, this is used in csd() to produce expected numbers of cases under a null hypothesis that prior cancers do not impact subsequent cancer risks.

Usage

1
mk2D(seerSet, knots=5, write=FALSE, outDir="~/Results",txt=NULL,secondS=NULL)

Arguments

seerSet

Object of class seerSet, i.e. output list of seerSet().

knots

Base number of knots; overrides are in place for some cancers.

write

TRUE = write 2D fits to files. The fits can be >300 MB and take >60 seconds to write, so leave FALSE unless you need it.

outDir

Folder that will hold the output files.

txt

Additional text to distinguish files with different cancer lists. This may be useful during spline fit development.

secondS

Charcter vector of second cancers of interest (note: I often capitalize the final S of vectors of Strings).

Value

The input seerSet with an additional data frame D added to this list. D holds background/expected incidences over a 1-year resolution age-year grid.

Author(s)

Tom Radivoyevitch (radivot@ccf.org)

See Also

SEERaBomb-package, plot2D, seerSet

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(SEERaBomb)
(pm=simSeerSet())
(pm=mk2D(pm))
names(pm)
head(pm$D)
tail(pm$D)

## End(Not run)

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