Simulate.EventSim: Perform a time to event simulation

Description Usage Arguments Value

View source: R/eventSim.R

Description

A time to event simulation is run for subjects specified by startCounts Each subject is simulated until enough time has passed so that the rate matrices will no longer switch and the subject cannot transition into another state

All rates which have been defined as formulae must be evaluated before calling this function See EvaluateFormula.EventSim. If this is not the case then an error message will be displayed

Usage

1
Simulate.EventSim(object, startCounts, seed = NULL, duration = Inf)

Arguments

object

An EventSim object

startCounts

A vector containing nodeNames and number of subjects starting in this node, for example c("control.progressing",5,"active.progressing",5). If a node is not included in this list then it is assumed that no subjects start at this location

seed

Random seed (for recruitment)

duration

The patient time at which the simulation should end.

Value

A list containing a data frame ("data") containing columns id, state, patient_transition_time which describe which patient transitions into which state at which patient_time and a vector or recruitment times (recruitmentTimes)


scientific-computing-solutions/badminton documentation built on May 29, 2019, 3:43 p.m.