define_surv_table: Define a survival distribution based on explicit survival...

Description Usage Arguments Value Examples

View source: R/survival_define.R

Description

Define a survival distribution based on explicit survival probabilities

Usage

1
2
3
4
5
6
7
define_surv_table(x, by_age = FALSE)

## S3 method for class 'data.frame'
define_surv_table(x, by_age = FALSE)

## S3 method for class 'character'
define_surv_table(x, by_age = FALSE)

Arguments

x

a data frame with columns time and survival

by_age

is time actually age? If so, don't require time to start wtih 0.

Value

a surv_table object, which can be used with heemod::compute_surv().

Examples

1
2
3
 x <- data.frame(time = c(0, 1, 5, 10), survival = c(1, 0.9, 0.7, 0.5))
 define_surv_table(x)
 

MattWiener/heemodFits documentation built on May 19, 2019, 8:21 a.m.