prep_data: Prepare data for mutli-state analysis

Description Usage Arguments Value

View source: R/prep_data.R

Description

Prepare data for a multi-state analysis either with survival::survfit or mstate and/or flexsurvreg

Usage

1
prep_data(data, format = "mstate")

Arguments

data

data imported with import_data()

format

either survival or mstate (default)

Value

a dataframe built with survival::tmerge or mstate::mprep; if format is 'mstate', then the matrix of possible transitions (tmat) is returned as an attribute


jpasquier/mscovid documentation built on March 31, 2021, 4:42 a.m.