createLifeTable-methods: Method to create life table

Description Usage Arguments Details Value

Description

Method to create life table

Usage

1
2
3
4
5
6
7
createLifeTable(object, ...)

## S4 method for signature 'SurvivalModel'
createLifeTable(object, times, modelToUse = NULL,
  Nsim = 500, class = c("data.frame", "FlexTable")[2], digits = 3,
  seed = NULL, B = 1000, conf.type = c("none", "plain", "log",
  "log-log")[3])

Arguments

object

(SurvivalModel object) contains fitted models

...

additional arguments for specific instances of this generic

times

(numeric vector) times at which to evaluate life table

modelToUse

(character vector) name of models to base life table upon. If NULL, the model with lowest AIC is chosen

Nsim

(numeric) number of simulations used to estimate the average curve - only used when models includes covariates

class

(data.frame or default flexTable) the class of the created table

digits

(numeric default 3) the number of decimal places to round the FlexTable output to

seed

(numeric, default NULL) if not NULL then set random seed (although it will only be used if models include covariates)

B

(integer) Only used when no covariates in model. See summary.flexsurvreg Number of simulations from the normal asymptotic distribution of the estimates used to calculate confidence intervals. Decrease for greater speed at the expense of accuracy, or set B=0 to turn off calculation of CIs.

conf.type

("none", "plain", "log" [default], "log-log") argument passed to survfit

Details

If the models include covariates a simulation procedure is required to generate averaged survival curves. If the models do not include covariates then summary.flexsurvreg is used

Value

The lifetable


scientific-computing-solutions/sibyl documentation built on May 21, 2019, 8:40 a.m.