SimulateDropout {dejaVu}R Documentation

Simulate subject dropout

Description

This function takes a complete recurrent event data set and drop out mechanism and creates a data set set with dropout

Usage

SimulateDropout(simComplete, drop.mechanism)

Arguments

simComplete

A SingleSim object (with status="complete")

drop.mechanism

A DropoutMechanism object

Value

A SingleSim object with status='dropout'

Examples

sim <- SimulateComplete(study.time=365,number.subjects=50,
                        event.rates=c(0.01,0.005),dispersions=0.25)
                        
sim.with.MCAR.dropout <- SimulateDropout(sim,
                      drop.mechanism = ConstantRateDrop(rate = 0.0025)) 
sim.with.MAR.dropout <- SimulateDropout(sim, 
                     drop.mechanism = LinearRateChangeDrop(
                                          starting.rate = 0.0025,
                                          rate.change = 0.0005))


[Package dejaVu version 0.3.1 Index]