Implement Drop-out Mechanism

dropout(dat, type_dropout = NULL, prop.miss = 0.3, stochastic.component = 0.2)

Arguments

type_dropout

pass character or character vector specifying the type of drop-out you want, options are c('mcar', 'cmcar', 'mar', 'mnar')

prop.miss

proportion missing, either a numeric scalar or vector, if vector, must be equal to number of timepoints if it's a scalar it will be the proportion at the last timepoint, amount at other timepoints will be equally spread out

stochastic.component

control how deterministic drop-out is by adding noise to the governing parameter; this is just the variance of a standard normal

data

pass a dataframe generated using function sim_dat()

Value

returns a dataframe containing the simulated data, with the original scores and the new scores with missingness

Details

Pass the dataframe of data and implement different types of drop-out to yield missing data that corresponds to different missing data categories TODO: Add checks, like if 'cmcar' is selected, and there's no covariate, kick error cannot implement dropout at baseline currently - should that be an option?