Skip to contents

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.

Usage

# S3 method for class 'glm'
dataComb(CFM, DC, id = NULL, trt = NULL, cfmOb = FALSE)

Arguments

CFM

a model object supplied to pscfit

DC

a dataset including covariates to match the CFM

id

to specify which observations in the data cohort should be evaluated. Defualts to 'NULL' i.e all observations

trt

used to specify multiple treatment effects. Defaults to NULL

cfmOb

used to specify if a CFM object is supplies as the counter factual model

Value

a list containing objects which specifiy the required exported components of the model and a cleaned data cohort. Attirbutes of the 'cleaned' object include: 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