simSurv {SEERaBomb}R Documentation

Simulate Survival Times

Description

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

Usage

 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

## Not run: 
library(SEERaBomb)
mkLT()
load("~/data/usMort/ltb.RData")
tail(ltb$Female)

## End(Not run)

[Package SEERaBomb version 2019.2 Index]