The purpose of this function is to prepare the dataset and the counter-factual model for estimation and is the first step pf the pscfit.R process. The output is a complete-case dataset where the data names match the variables used in the CFM.
# S3 method for flexsurvreg
dataComb(CFM, DC, id = NULL, trt = NULL)
a list containing objects which specifiy the required exported components of the model and a cleaned data cohort. Attributes include
'model.type' specifying the class of model to be used as the CFM
'model_extract' sepcifying the model componets required for estimation
'cov' a cleaned dataset of covariates
'outcome' a cleaned dataset containing the outcomes
a model object supplied to pscfit
a dataset including covariates to match the CFM
a vector specifiying whether a subset of the dataset should be selected. Defaults to 'NULL' e.g. all data points included
An optional additional vector denoting treatment allocations for multiple treatment comparisons. Defaults to 'NULL'