simSurv: Simulate Survival Times

Description Usage Arguments Value Author(s) See Also Examples

View source: R/simSurv.R

Description

Uses background mortality rates to simulate background survival time for matching sex, age and year.

Usage

1
 simSurv(d,mrt,rep=1,ltb=NULL,unif=TRUE)

Arguments

d

Data frame containing sex, agedx, yrdx, surv, and status columns of observed data.

mrt

Mortality data binary made by mkMrt().

rep

Number of simulated replicates of each observed case.

ltb

Life table data binary made by mkLT(). Default of NULL => skip it.

unif

TRUE => death time in final year is uniform random draw. False => death at mid-point of year.

Value

Input d with simulation rows added below it, identified as "simulated" in a new column called type.

Author(s)

Tom Radivoyevitch (radivot@ccf.org)

See Also

SEERaBomb-package,mkSEER

Examples

1
2
3
4
5
6
7
## Not run: 
library(SEERaBomb)
mkLT()
load("~/data/usMort/ltb.RData")
tail(ltb$Female)

## End(Not run)

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